Code style should not follow Yoda style
This commit is contained in:
parent
b968513cb9
commit
28c1bea28c
@ -6,7 +6,7 @@ $config = PhpCsFixer\Config::create()
|
|||||||
'@Symfony' => true,
|
'@Symfony' => true,
|
||||||
'align_multiline_comment' => false,
|
'align_multiline_comment' => false,
|
||||||
'array_syntax' => ['syntax' => 'short'],
|
'array_syntax' => ['syntax' => 'short'],
|
||||||
'binary_operator_spaces' => ['align_double_arrow' => true, 'align_equals' => null],
|
'binary_operator_spaces' => ['default' => null],
|
||||||
'blank_line_before_statement' => ['statements' => ['return']],
|
'blank_line_before_statement' => ['statements' => ['return']],
|
||||||
'combine_consecutive_unsets' => true,
|
'combine_consecutive_unsets' => true,
|
||||||
'concat_space' => ['spacing' => 'one'],
|
'concat_space' => ['spacing' => 'one'],
|
||||||
@ -43,6 +43,7 @@ $config = PhpCsFixer\Config::create()
|
|||||||
'single_line_comment_style' => ['comment_types' => ['hash']],
|
'single_line_comment_style' => ['comment_types' => ['hash']],
|
||||||
'strict_comparison' => true,
|
'strict_comparison' => true,
|
||||||
'void_return' => true,
|
'void_return' => true,
|
||||||
|
'yoda_style' => ['equal' => false, 'identical' => false],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$config->setFinder(
|
$config->setFinder(
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^5.7.0",
|
"phpunit/phpunit": "^5.7.0",
|
||||||
"friendsofphp/php-cs-fixer": "^2.5.0"
|
"friendsofphp/php-cs-fixer": "^2.7.0"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-iconv": "To handle non UTF-8 CSV files (if \"php-intl\" is not already installed or is too limited)",
|
"ext-iconv": "To handle non UTF-8 CSV files (if \"php-intl\" is not already installed or is too limited)",
|
||||||
|
@ -72,7 +72,7 @@ class Psr4Autoloader
|
|||||||
|
|
||||||
// work backwards through the namespace names of the fully-qualified
|
// work backwards through the namespace names of the fully-qualified
|
||||||
// class name to find a mapped file name
|
// class name to find a mapped file name
|
||||||
while (false !== $pos = strrpos($prefix, '\\')) {
|
while (($pos = strrpos($prefix, '\\')) !== false) {
|
||||||
// retain the trailing namespace separator in the prefix
|
// retain the trailing namespace separator in the prefix
|
||||||
$prefix = substr($class, 0, $pos + 1);
|
$prefix = substr($class, 0, $pos + 1);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user