Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixed the pre-commit script, missed the fix command #3029

Closed
wants to merge 1 commit into from

4 participants

@ezimuel
Owner

Fixed the syntax of php-cs-fixer, missed the fix command:
php-cs-fixer --dry-run --level=psr2 fix

@Slamdunk

The command should be the first argument after executable:

exec("php-cs-fixer fix --dry-run --level=psr2 " . escapeshellarg($fileName), $output, $return);
@weierophinney weierophinney referenced this pull request from a commit
@weierophinney weierophinney [#3029] Move "fix" keyword
- Moved to after command, but before options
09dc602
@Slamdunk

@weierophinney As I wrote previously, you've merged a bugged bugfix

@Maks3w
Collaborator

@Slamdunk See 09dc602 @weierophinney read your comment before merge

@Slamdunk

Commits mixing is not so clear while merging, sry if I didn't see that.

@ghost Unknown referenced this pull request from a commit
@weierophinney weierophinney [#3029] Move "fix" keyword
- Moved to after command, but before options
e25b1be
@ghost Unknown referenced this pull request from a commit
@weierophinney weierophinney Merge branch 'hotfix/3029'
Close #3029
3805511
@ghost Unknown referenced this pull request from a commit
@weierophinney weierophinney Merge branch 'hotfix/3029' into develop
Forward port #3029
40a3a99
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 20, 2012
  1. @ezimuel
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  README-GIT.md
View
2  README-GIT.md
@@ -140,7 +140,7 @@ foreach ($output as $file) {
*/
$output = array();
$return = null;
- exec("php-cs-fixer --dry-run --level=psr2 " . escapeshellarg($fileName), $output, $return);
+ exec("php-cs-fixer --dry-run --level=psr2 fix " . escapeshellarg($fileName), $output, $return);
if ($return != 0 || !empty($output)) {
echo "PHP file fails contains CS issues: " . $fileName . ":" . PHP_EOL;
echo implode(PHP_EOL, $output) . PHP_EOL;
Something went wrong with that request. Please try again.