Created
April 10, 2018 09:16
-
-
Save IamSwap/9ac0266fed26c3312de276ba372b0b23 to your computer and use it in GitHub Desktop.
WordPress .php_cs for sublime text
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 | |
/** | |
* Config for PHP-CS-Fixer ver2 | |
*/ | |
$rules = array( | |
'@PSR2' => false, | |
// addtional rules | |
'array_syntax' => array('syntax' => 'long'), | |
'no_multiline_whitespace_before_semicolons' => true, | |
'no_short_echo_tag' => true, | |
'not_operator_with_successor_space' => true, | |
'braces' => array('position_after_functions_and_oop_constructs' => 'same') | |
); | |
$excludes = array( | |
// add exclude project directory | |
'node_modules', | |
); | |
return PhpCsFixer\Config::create() | |
->setRules($rules) | |
->setFinder( | |
PhpCsFixer\Finder::create() | |
->exclude($excludes) | |
->notName('README.md') | |
->notName('*.xml') | |
->notName('*.yml') | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment