Browse Source

CS: unify styling with younger branches

Dariusz Ruminski 4 years ago
parent
commit
9435c4e44a

+ 1 - 0
php-cs-fixer

@@ -57,6 +57,7 @@ if (class_exists('Phar')) {
     // Maybe this file is used as phar-stub? Let's try!
     // Maybe this file is used as phar-stub? Let's try!
     try {
     try {
         Phar::mapPhar('php-cs-fixer.phar');
         Phar::mapPhar('php-cs-fixer.phar');
+
         require_once 'phar://php-cs-fixer.phar/vendor/autoload.php';
         require_once 'phar://php-cs-fixer.phar/vendor/autoload.php';
         $require = false;
         $require = false;
     } catch (PharException $e) {
     } catch (PharException $e) {

+ 1 - 1
src/Console/Command/FixCommand.php

@@ -170,7 +170,7 @@ final class FixCommand extends Command
             $configFile = $resolver->getConfigFile();
             $configFile = $resolver->getConfigFile();
             $stdErr->writeln(sprintf('Loaded config <comment>%s</comment>%s.', $resolver->getConfig()->getName(), null === $configFile ? '' : ' from "'.$configFile.'"'));
             $stdErr->writeln(sprintf('Loaded config <comment>%s</comment>%s.', $resolver->getConfig()->getName(), null === $configFile ? '' : ' from "'.$configFile.'"'));
             if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
             if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
-                $stdErr->writeln(sprintf('Runtime: <info>PHP %s</info>', \PHP_VERSION));
+                $stdErr->writeln(sprintf('Runtime: <info>PHP %s</info>', PHP_VERSION));
             }
             }
 
 
             if ($resolver->getUsingCache()) {
             if ($resolver->getUsingCache()) {

+ 1 - 1
src/Fixer/PhpUnit/PhpUnitExpectationFixer.php

@@ -230,7 +230,7 @@ final class MyTest extends \PHPUnit_Framework_TestCase
                 ];
                 ];
 
 
                 if ($isMultilineWhitespace) {
                 if ($isMultilineWhitespace) {
-                    array_push($tokensOverrideArgStart, new Token([T_WHITESPACE, $indent.$this->whitespacesConfig->getIndent()]));
+                    $tokensOverrideArgStart[] = new Token([T_WHITESPACE, $indent.$this->whitespacesConfig->getIndent()]);
                     array_unshift($tokensOverrideArgBefore, new Token([T_WHITESPACE, $indent]));
                     array_unshift($tokensOverrideArgBefore, new Token([T_WHITESPACE, $indent]));
                 }
                 }
 
 

+ 1 - 1
src/Fixer/PhpUnit/PhpUnitTestAnnotationFixer.php

@@ -264,7 +264,7 @@ public function testItDoesSomething() {}}'.$this->whitespacesConfig->getLineEndi
             return 'test_'.$functionName;
             return 'test_'.$functionName;
         }
         }
 
 
-        return'test'.ucfirst($functionName);
+        return 'test'.ucfirst($functionName);
     }
     }
 
 
     /**
     /**

+ 1 - 1
src/Fixer/StringNotation/ExplicitStringVariableFixer.php

@@ -123,7 +123,7 @@ EOT
 
 
                 ++$nextIndex;
                 ++$nextIndex;
             }
             }
-            krsort($variableTokens, \SORT_NUMERIC);
+            krsort($variableTokens, SORT_NUMERIC);
 
 
             foreach ($variableTokens as $distinctVariableSet) {
             foreach ($variableTokens as $distinctVariableSet) {
                 if (1 === \count($distinctVariableSet['tokens'])) {
                 if (1 === \count($distinctVariableSet['tokens'])) {

+ 1 - 1
tests/Smoke/CiIntegrationTest.php

@@ -152,7 +152,7 @@ If you need help while solving warnings, ask at https://gitter.im/PHP-CS-Fixer,
             preg_quote($optionalIncompatibilityWarning, '/'),
             preg_quote($optionalIncompatibilityWarning, '/'),
             preg_quote($optionalXdebugWarning, '/'),
             preg_quote($optionalXdebugWarning, '/'),
             preg_quote('Loaded config default from ".php_cs.dist".', '/'),
             preg_quote('Loaded config default from ".php_cs.dist".', '/'),
-            preg_quote(sprintf("Runtime: PHP %s\n", \PHP_VERSION), '/'),
+            preg_quote(sprintf("Runtime: PHP %s\n", PHP_VERSION), '/'),
             \strlen($expectedResult3Files),
             \strlen($expectedResult3Files),
             preg_quote('Legend: ?-unknown, I-invalid file syntax (file ignored), S-skipped (cached or empty file), .-no changes, F-fixed, E-error', '/')
             preg_quote('Legend: ?-unknown, I-invalid file syntax (file ignored), S-skipped (cached or empty file), .-no changes, F-fixed, E-error', '/')
         );
         );