This Sublime Text 3 Package provides interface for PHP Coding Standards Fixer
First make sure that PHP-CS-Fixer is installed. This plugin is compatible with v2. For more information visit PHP-CS-Fixer website
Not available
Clone this repository into {packages directory}/PHPCSFixer
.
You can find it using Sublime menu: Preferences > Browse Packages
There aren't any keybindings included, but you can simply bind command yourself.
Fixes active file
Settings have 3 scopes: default, user and project. Default should not be changed. Settings can be accessed via Preferences > Package Settings > PHP-CS-Fixer > Settings
If you want to configure this plugin for project you can create php-cs-fixer
entry in .sublime-project
file:
{
"folders":
[
{
"path": "."
}
],
"settings":
{
"php-cs-fixer": {
"ignored_extensions": [".phtml"],
"on_save": true,
"rules": ["@PSR2,no_unused_imports,trailing_comma_in_multiline_array"],
}
}
}
Executable path.
Ignored filename endings, useful when using templating system where fixing could produce unpredictable output.
Automatically fix file on save.
List of rules applied to fixer. List of all rules available here.
- Handling .phpcs configuration file
This plugin was inspired by GitGutter plugin, sublime-phpcs and PHP-CS-Fixer.