Created
June 25, 2015 11:09
-
-
Save hugochinchilla/db9b7c0abea3be2c6ac8 to your computer and use it in GitHub Desktop.
Sublime PHP builder (not really)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$finder = Symfony\CS\Finder\DefaultFinder::create() | |
->exclude('web') | |
->exclude('lib/vendor') | |
->in(__DIR__); | |
return Symfony\CS\Config\Config::create() | |
->level(Symfony\CS\FixerInterface::NONE_LEVEL) | |
->fixers([ | |
'encoding', | |
'linefeed', | |
'namespace_no_leading_whitespace', | |
'multiple_use', | |
'unused_use', | |
'ordered_use', | |
'remove_lines_between_uses', | |
'single_line_after_imports', | |
'trailing_spaces', | |
'whitespacy_lines', | |
'extra_empty_lines', | |
'duplicate_semicolon', | |
//'return', | |
]) | |
->finder($finder); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
# ~/.config/sublime-text-3/Packages/User/PHP-lint.sublime-build | |
{ | |
"shell": true, | |
"cmd": ["php -l $file && php-cs-fixer --config-file=/path/to/csfixer.conf fix $file"] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment