diff --git a/.php_cs.dist b/.php_cs.dist index f2a404c..04bf320 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -6,7 +6,7 @@ $config = PhpCsFixer\Config::create() '@Symfony' => true, 'align_multiline_comment' => false, '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']], 'combine_consecutive_unsets' => true, 'concat_space' => ['spacing' => 'one'], @@ -43,6 +43,7 @@ $config = PhpCsFixer\Config::create() 'single_line_comment_style' => ['comment_types' => ['hash']], 'strict_comparison' => true, 'void_return' => true, + 'yoda_style' => ['equal' => false, 'identical' => false], ]); $config->setFinder( diff --git a/composer.json b/composer.json index b1eaf23..f5d7057 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ }, "require-dev": { "phpunit/phpunit": "^5.7.0", - "friendsofphp/php-cs-fixer": "^2.5.0" + "friendsofphp/php-cs-fixer": "^2.7.0" }, "suggest": { "ext-iconv": "To handle non UTF-8 CSV files (if \"php-intl\" is not already installed or is too limited)", diff --git a/src/Spout/Autoloader/Psr4Autoloader.php b/src/Spout/Autoloader/Psr4Autoloader.php index 9dcc374..1699293 100644 --- a/src/Spout/Autoloader/Psr4Autoloader.php +++ b/src/Spout/Autoloader/Psr4Autoloader.php @@ -72,7 +72,7 @@ class Psr4Autoloader // work backwards through the namespace names of the fully-qualified // 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 $prefix = substr($class, 0, $pos + 1);