Show installation and setup instructions when cannot find php-cs-fixer

See #311. Closes #288.
This commit is contained in:
Glavin Wiechert 2015-06-06 13:39:47 -03:00
parent c9159f2a92
commit 5469dd56bd
3 changed files with 18 additions and 3 deletions

View File

@ -526,7 +526,7 @@ Path to uncrustify config file. i.e. uncrustify.cfg (Supported by Uncrustify)
**Description**: **Description**:
Specify a configuration file which will override the default name of .perltidyrc (Supported by Perltidy) Specify a configuration file which will override the default name of .perltidyrc (Supported by Perltidy)
### PHP - Cs fixer path ### PHP - PHP-CS-Fixer Path
**Key**: `php_cs_fixer_path` **Key**: `php_cs_fixer_path`

View File

@ -24,7 +24,14 @@ module.exports = class PHPCSFixer extends Beautifier
"--level=#{options.level}" if options.level "--level=#{options.level}" if options.level
"--fixers=#{options.fixers}" if options.fixers "--fixers=#{options.fixers}" if options.fixers
tempFile = @tempFile("temp", text) tempFile = @tempFile("temp", text)
], {ignoreReturnCode: true}) ], {
ignoreReturnCode: true
help: {
link: "https://github.com/FriendsOfPHP/PHP-CS-Fixer"
program: "php-cs-fixer.phar"
pathOption: "PHP - CS Fixer Path"
}
})
.then(=> .then(=>
@readFile(tempFile) @readFile(tempFile)
) )
@ -34,7 +41,14 @@ module.exports = class PHPCSFixer extends Beautifier
"--level=#{options.level}" if options.level "--level=#{options.level}" if options.level
"--fixers=#{options.fixers}" if options.fixers "--fixers=#{options.fixers}" if options.fixers
tempFile = @tempFile("temp", text) tempFile = @tempFile("temp", text)
], {ignoreReturnCode: true}) ], {
ignoreReturnCode: true
help: {
link: "https://github.com/FriendsOfPHP/PHP-CS-Fixer"
program: "php-cs-fixer.phar"
pathOption: "PHP - CS Fixer Path"
}
})
.then(=> .then(=>
@readFile(tempFile) @readFile(tempFile)
) )

View File

@ -19,6 +19,7 @@ module.exports = {
options: options:
cs_fixer_path: cs_fixer_path:
title: "PHP-CS-Fixer Path"
type: 'string' type: 'string'
default: "" default: ""
description: "Path to the `php-cs-fixer` CLI executable" description: "Path to the `php-cs-fixer` CLI executable"