Browse Source

Reapply CS

Dariusz Ruminski 7 years ago
parent
commit
4be01b20f3

+ 1 - 0
src/AbstractFunctionReferenceFixer.php

@@ -130,6 +130,7 @@ abstract class AbstractFunctionReferenceFixer extends AbstractFixer
 
             if (null !== $blockDefinitionProbe && true === $blockDefinitionProbe['isStart']) {
                 $paramContentIndex = $tokens->findBlockEnd($blockDefinitionProbe['type'], $paramContentIndex);
+
                 continue;
             }
 

+ 2 - 2
src/Cache/Cache.php

@@ -58,8 +58,8 @@ final class Cache implements CacheInterface
         if (!is_int($hash)) {
             throw new \InvalidArgumentException(sprintf(
                 'Value needs to be an integer, got "%s".',
-                is_object($hash) ? get_class($hash) : gettype($hash))
-            );
+                is_object($hash) ? get_class($hash) : gettype($hash)
+            ));
         }
 
         $this->hashes[$file] = $hash;

+ 4 - 1
src/Console/Command/DescribeCommand.php

@@ -92,6 +92,7 @@ final class DescribeCommand extends Command
     protected function execute(InputInterface $input, OutputInterface $output)
     {
         $name = $input->getArgument('name');
+
         try {
             if ('@' === $name[0]) {
                 $this->describeSet($output, $name);
@@ -106,7 +107,9 @@ final class DescribeCommand extends Command
 
             throw new \InvalidArgumentException(sprintf(
                 '%s "%s" not found.%s',
-                ucfirst($e->getType()), $name, null === $alternative ? '' : ' Did you mean "'.$alternative.'"?'
+                ucfirst($e->getType()),
+                $name,
+                null === $alternative ? '' : ' Did you mean "'.$alternative.'"?'
             ));
         }
     }

+ 2 - 1
src/Console/Command/SelfUpdateCommand.php

@@ -43,7 +43,8 @@ final class SelfUpdateCommand extends Command
                 )
             )
             ->setDescription('Update php-cs-fixer.phar to the latest stable version.')
-            ->setHelp(<<<'EOT'
+            ->setHelp(
+                <<<'EOT'
 The <info>%command.name%</info> command replace your php-cs-fixer.phar by the
 latest version released on:
 <comment>https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases</comment>

+ 2 - 2
src/Console/ConfigurationResolver.php

@@ -653,10 +653,10 @@ final class ConfigurationResolver
             return true;
         }, $rules));
 
-        /* @var string[] $availableFixers */
+        /** @var string[] $configuredFixers */
         $configuredFixers = array_keys($ruleSet->getRules());
 
-        /* @var string[] $availableFixers */
+        /** @var string[] $availableFixers */
         $availableFixers = array_map(function (FixerInterface $fixer) {
             return $fixer->getName();
         }, $this->createFixerFactory()->getFixers());

+ 1 - 0
src/Fixer/Alias/NoMixedEchoPrintFixer.php

@@ -149,6 +149,7 @@ final class NoMixedEchoPrintFixer extends AbstractFixer implements Configuration
 
             if ($tokens[$i]->equals(',')) {
                 $canBeConverted = false;
+
                 break;
             }
         }

+ 4 - 0
src/Fixer/Basic/BracesFixer.php

@@ -351,6 +351,7 @@ class Foo
 
                 if ($nestToken->equals(')')) {
                     $nestIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $nestIndex, false);
+
                     continue;
                 }
 
@@ -407,11 +408,13 @@ class Foo
 
                 if ($nestToken->equals('}')) {
                     ++$nestLevel;
+
                     continue;
                 }
 
                 if ($nestToken->equals('{')) {
                     --$nestLevel;
+
                     continue;
                 }
             }
@@ -649,6 +652,7 @@ class Foo
             // if there is some block in statement (eg lambda function) we need to skip it
             if ($token->equals('{')) {
                 $index = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $index);
+
                 continue;
             }
 

+ 1 - 0
src/Fixer/Casing/NativeFunctionCasingFixer.php

@@ -62,6 +62,7 @@ final class NativeFunctionCasingFixer extends AbstractFixer
             $next = $tokens->getNextMeaningfulToken($index);
             if (!$tokens[$next]->equals('(')) {
                 $index = $next;
+
                 continue;
             }
 

+ 4 - 2
src/Fixer/CastNotation/ModernizeTypesCastingFixer.php

@@ -30,14 +30,16 @@ final class ModernizeTypesCastingFixer extends AbstractFunctionReferenceFixer
     {
         return new FixerDefinition(
             'Replaces `intval`, `floatval`, `doubleval`, `strval` and `boolval` function calls with according type casting operator.',
-            array(new CodeSample(
+            array(
+                new CodeSample(
 '<?php
     $a = intval($b);
     $a = floatval($b);
     $a = doubleval($b);
     $a = strval ($b);
     $a = boolval($b);
-'),
+'
+                ),
             ),
             null,
             'Risky if any of the functions `intval`, `floatval`, `doubleval`, `strval` or `boolval` are overridden.'

+ 1 - 0
src/Fixer/CastNotation/NoShortBoolCastFixer.php

@@ -74,6 +74,7 @@ final class NoShortBoolCastFixer extends AbstractFixer
         for ($i = $index - 1; $i > 1; --$i) {
             if ($tokens[$i]->equals('!')) {
                 $this->fixShortCastToBoolCast($tokens, $i, $index);
+
                 break;
             }
 

Some files were not shown because too many files changed in this diff