Browse Source

Merge branch '2.2' into 2.7

# Conflicts:
#	src/AbstractDoctrineAnnotationFixer.php
#	src/Fixer/CastNotation/ModernizeTypesCastingFixer.php
#	src/Fixer/ClassNotation/NoPhp4ConstructorFixer.php
#	tests/Fixer/Alias/RandomApiMigrationFixerTest.php
#	tests/Fixer/Basic/BracesFixerTest.php
#	tests/Fixer/Casing/LowercaseConstantsFixerTest.php
#	tests/Fixer/ClassNotation/ClassDefinitionFixerTest.php
#	tests/Fixer/ClassNotation/MethodSeparationFixerTest.php
#	tests/Fixer/ClassNotation/NoPhp4ConstructorFixerTest.php
#	tests/Fixer/Comment/HeaderCommentFixerTest.php
#	tests/Fixer/FunctionNotation/NativeFunctionInvocationFixerTest.php
#	tests/Fixer/Import/NoUnusedImportsFixerTest.php
#	tests/Fixer/LanguageConstruct/CombineConsecutiveUnsetsFixerTest.php
#	tests/Fixer/LanguageConstruct/IsNullFixerTest.php
#	tests/Fixer/Phpdoc/PhpdocAlignFixerTest.php
#	tests/Fixer/Phpdoc/PhpdocInlineTagFixerTest.php
#	tests/Fixer/Phpdoc/PhpdocNoUselessInheritdocFixerTest.php
#	tests/Fixer/Semicolon/NoEmptyStatementFixerTest.php
#	tests/Fixer/Semicolon/SemicolonAfterInstructionFixerTest.php
#	tests/Fixer/Whitespace/IndentationTypeFixerTest.php
#	tests/Fixer/Whitespace/NoExtraConsecutiveBlankLinesFixerTest.php
Dariusz Ruminski 7 years ago
parent
commit
91cd1cfe58

+ 103 - 103
src/AbstractDoctrineAnnotationFixer.php

@@ -87,109 +87,109 @@ abstract class AbstractDoctrineAnnotationFixer extends AbstractFixer implements
                     return true;
                 }])
                 ->setDefault([
-                     // PHPDocumentor 1
-                     'abstract',
-                     'access',
-                     'code',
-                     'deprec',
-                     'encode',
-                     'exception',
-                     'final',
-                     'ingroup',
-                     'inheritdoc',
-                     'inheritDoc',
-                     'magic',
-                     'name',
-                     'toc',
-                     'tutorial',
-                     'private',
-                     'static',
-                     'staticvar',
-                     'staticVar',
-                     'throw',
-
-                     // PHPDocumentor 2
-                     'api',
-                     'author',
-                     'category',
-                     'copyright',
-                     'deprecated',
-                     'example',
-                     'filesource',
-                     'global',
-                     'ignore',
-                     'internal',
-                     'license',
-                     'link',
-                     'method',
-                     'package',
-                     'param',
-                     'property',
-                     'property-read',
-                     'property-write',
-                     'return',
-                     'see',
-                     'since',
-                     'source',
-                     'subpackage',
-                     'throws',
-                     'todo',
-                     'TODO',
-                     'usedBy',
-                     'uses',
-                     'var',
-                     'version',
-
-                     // PHPUnit
-                     'after',
-                     'afterClass',
-                     'backupGlobals',
-                     'backupStaticAttributes',
-                     'before',
-                     'beforeClass',
-                     'codeCoverageIgnore',
-                     'codeCoverageIgnoreStart',
-                     'codeCoverageIgnoreEnd',
-                     'covers',
-                     'coversDefaultClass',
-                     'coversNothing',
-                     'dataProvider',
-                     'depends',
-                     'expectedException',
-                     'expectedExceptionCode',
-                     'expectedExceptionMessage',
-                     'expectedExceptionMessageRegExp',
-                     'group',
-                     'large',
-                     'medium',
-                     'preserveGlobalState',
-                     'requires',
-                     'runTestsInSeparateProcesses',
-                     'runInSeparateProcess',
-                     'small',
-                     'test',
-                     'testdox',
-                     'ticket',
-                     'uses',
-
-                     // PHPCheckStyle
-                     'SuppressWarnings',
-
-                     // PHPStorm
-                     'noinspection',
-
-                     // PEAR
-                     'package_version',
-
-                     // PlantUML
-                     'enduml',
-                     'startuml',
-
-                     // other
-                     'fix',
-                     'FIXME',
-                     'fixme',
-                     'override',
+                    // PHPDocumentor 1
+                    'abstract',
+                    'access',
+                    'code',
+                    'deprec',
+                    'encode',
+                    'exception',
+                    'final',
+                    'ingroup',
+                    'inheritdoc',
+                    'inheritDoc',
+                    'magic',
+                    'name',
+                    'toc',
+                    'tutorial',
+                    'private',
+                    'static',
+                    'staticvar',
+                    'staticVar',
+                    'throw',
+
+                    // PHPDocumentor 2
+                    'api',
+                    'author',
+                    'category',
+                    'copyright',
+                    'deprecated',
+                    'example',
+                    'filesource',
+                    'global',
+                    'ignore',
+                    'internal',
+                    'license',
+                    'link',
+                    'method',
+                    'package',
+                    'param',
+                    'property',
+                    'property-read',
+                    'property-write',
+                    'return',
+                    'see',
+                    'since',
+                    'source',
+                    'subpackage',
+                    'throws',
+                    'todo',
+                    'TODO',
+                    'usedBy',
+                    'uses',
+                    'var',
+                    'version',
+
+                    // PHPUnit
+                    'after',
+                    'afterClass',
+                    'backupGlobals',
+                    'backupStaticAttributes',
+                    'before',
+                    'beforeClass',
+                    'codeCoverageIgnore',
+                    'codeCoverageIgnoreStart',
+                    'codeCoverageIgnoreEnd',
+                    'covers',
+                    'coversDefaultClass',
+                    'coversNothing',
+                    'dataProvider',
+                    'depends',
+                    'expectedException',
+                    'expectedExceptionCode',
+                    'expectedExceptionMessage',
+                    'expectedExceptionMessageRegExp',
+                    'group',
+                    'large',
+                    'medium',
+                    'preserveGlobalState',
+                    'requires',
+                    'runTestsInSeparateProcesses',
+                    'runInSeparateProcess',
+                    'small',
+                    'test',
+                    'testdox',
+                    'ticket',
+                    'uses',
+
+                    // PHPCheckStyle
+                    'SuppressWarnings',
+
+                    // PHPStorm
+                    'noinspection',
+
+                    // PEAR
+                    'package_version',
+
+                    // PlantUML
+                    'enduml',
+                    'startuml',
+
+                    // other
+                    'fix',
+                    'FIXME',
+                    'fixme',
+                    'override',
                 ])
                 ->getOption(),
         ]);

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

@@ -98,7 +98,7 @@ final class NoMixedEchoPrintFixer extends AbstractFixer implements Configuration
         $callBack = $this->callBack;
         foreach ($tokens as $index => $token) {
             if ($token->isGivenKind($this->candidateTokenType)) {
-                $this->$callBack($tokens, $index);
+                $this->{$callBack}($tokens, $index);
             }
         }
     }

+ 1 - 1
src/Fixer/ArrayNotation/ArraySyntaxFixer.php

@@ -91,7 +91,7 @@ final class ArraySyntaxFixer extends AbstractFixer implements ConfigurationDefin
         $callback = $this->fixCallback;
         for ($index = $tokens->count() - 1; 0 <= $index; --$index) {
             if ($tokens[$index]->isGivenKind($this->candidateTokenKind)) {
-                $this->$callback($tokens, $index);
+                $this->{$callback}($tokens, $index);
             }
         }
     }

+ 5 - 5
src/Fixer/CastNotation/ModernizeTypesCastingFixer.php

@@ -62,11 +62,11 @@ final class ModernizeTypesCastingFixer extends AbstractFunctionReferenceFixer
     {
         // replacement patterns
         static $replacement = [
-             'intval' => [T_INT_CAST, '(int)'],
-             'floatval' => [T_DOUBLE_CAST, '(float)'],
-             'doubleval' => [T_DOUBLE_CAST, '(float)'],
-             'strval' => [T_STRING_CAST, '(string)'],
-             'boolval' => [T_BOOL_CAST, '(bool)'],
+            'intval' => [T_INT_CAST, '(int)'],
+            'floatval' => [T_DOUBLE_CAST, '(float)'],
+            'doubleval' => [T_DOUBLE_CAST, '(float)'],
+            'strval' => [T_STRING_CAST, '(string)'],
+            'boolval' => [T_BOOL_CAST, '(bool)'],
         ];
 
         $argumentsAnalyzer = new ArgumentsAnalyzer();

+ 1 - 1
src/Fixer/ClassNotation/NoPhp4ConstructorFixer.php

@@ -32,7 +32,7 @@ final class NoPhp4ConstructorFixer extends AbstractFixer
         return new FixerDefinition(
             'Convert PHP4-style constructors to `__construct`.',
             [
-               new CodeSample('<?php
+                new CodeSample('<?php
 class Foo
 {
     public function Foo($bar)

+ 1 - 1
src/Fixer/LanguageConstruct/DeclareEqualNormalizeFixer.php

@@ -77,7 +77,7 @@ final class DeclareEqualNormalizeFixer extends AbstractFixer implements Configur
 
             while (!$tokens[++$index]->equals('='));
 
-            $this->$callback($tokens, $index);
+            $this->{$callback}($tokens, $index);
         }
     }
 

+ 1 - 1
src/Fixer/Operator/ConcatSpaceFixer.php

@@ -82,7 +82,7 @@ final class ConcatSpaceFixer extends AbstractFixer implements ConfigurationDefin
         $callBack = $this->fixCallback;
         for ($index = $tokens->count() - 1; $index >= 0; --$index) {
             if ($tokens[$index]->equals('.')) {
-                $this->$callBack($tokens, $index);
+                $this->{$callBack}($tokens, $index);
             }
         }
     }

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

@@ -104,7 +104,7 @@ $this->assertNotSame(null, $d);
             $assertionFixer = self::$assertionFixers[$assertionMethod];
 
             for ($index = 0, $limit = $tokens->count(); $index < $limit; ++$index) {
-                $index = $this->$assertionFixer($tokens, $index, $assertionMethod);
+                $index = $this->{$assertionFixer}($tokens, $index, $assertionMethod);
 
                 if (null === $index) {
                     break;

+ 2 - 2
src/Fixer/Whitespace/NoExtraConsecutiveBlankLinesFixer.php

@@ -324,7 +324,7 @@ switch($a) {
                 continue;
             }
 
-            $this->$callback($index);
+            $this->{$callback}($index);
 
             return;
         }
@@ -334,7 +334,7 @@ switch($a) {
                 continue;
             }
 
-            $this->$callback($index);
+            $this->{$callback}($index);
 
             return;
         }

+ 1 - 1
src/Test/AccessibleObject.php

@@ -54,7 +54,7 @@ final class AccessibleObject
     public function __isset($name)
     {
         try {
-            $value = $this->$name;
+            $value = $this->{$name};
         } catch (\LogicException $e) {
             return false;
         }

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