Skip to content

Instantly share code, notes, and snippets.

@hugochinchilla
Created June 25, 2015 11:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hugochinchilla/db9b7c0abea3be2c6ac8 to your computer and use it in GitHub Desktop.
Save hugochinchilla/db9b7c0abea3be2c6ac8 to your computer and use it in GitHub Desktop.
Sublime PHP builder (not really)
<?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);
# ~/.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