Browse Source

bug #4085 Priority: AlignMultilineComment should run before every PhpdocFixer (dmvdbrugge)

This PR was merged into the 2.18 branch.

Discussion
----------

Priority: AlignMultilineComment should run before every PhpdocFixer

I made use of the graph I generated with https://github.com/dmvdbrugge/fixer-prio-graph

I also found a hidden priority between LineEnding and Braces, which I had to add in this PR as well, because otherwise the `@Symfony_whitespace.test` would fail.

Fixes #3879

Commits
-------

701708e74 Priority: AlignMultilineComment should run before every PhpdocFixer
Dariusz Ruminski 4 years ago
parent
commit
fc4791c1fb

+ 1 - 1
src/AbstractNoUselessElseFixer.php

@@ -25,7 +25,7 @@ abstract class AbstractNoUselessElseFixer extends AbstractFixer
     public function getPriority()
     {
         // should be run before NoWhitespaceInBlankLineFixer, NoExtraBlankLinesFixer, BracesFixer and after NoEmptyStatementFixer.
-        return 25;
+        return 39;
     }
 
     /**

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

@@ -178,7 +178,7 @@ mbereg_search_getregs();
      */
     public function getPriority()
     {
-        return 0;
+        return 40;
     }
 
     /**

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

@@ -58,7 +58,7 @@ final class PowToExponentiationFixer extends AbstractFunctionReferenceFixer
      */
     public function getPriority()
     {
-        return 3;
+        return 32;
     }
 
     /**

+ 1 - 1
src/Fixer/Basic/BracesFixer.php

@@ -130,7 +130,7 @@ class Foo
      */
     public function getPriority()
     {
-        return -25;
+        return 35;
     }
 
     /**

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

@@ -49,7 +49,7 @@ final class Example
      */
     public function getPriority()
     {
-        return 1;
+        return 36;
     }
 
     public function isCandidate(Tokens $tokens)

+ 1 - 0
src/Fixer/Comment/CommentToPhpdocFixer.php

@@ -55,6 +55,7 @@ final class CommentToPhpdocFixer extends AbstractFixer implements ConfigurationD
      * {@inheritdoc}
      *
      * Must run before GeneralPhpdocAnnotationRemoveFixer, GeneralPhpdocTagRenameFixer, NoBlankLinesAfterPhpdocFixer, NoEmptyPhpdocFixer, NoSuperfluousPhpdocTagsFixer, PhpdocAddMissingParamAnnotationFixer, PhpdocAlignFixer, PhpdocAlignFixer, PhpdocAnnotationWithoutDotFixer, PhpdocInlineTagFixer, PhpdocInlineTagNormalizerFixer, PhpdocLineSpanFixer, PhpdocNoAccessFixer, PhpdocNoAliasTagFixer, PhpdocNoEmptyReturnFixer, PhpdocNoPackageFixer, PhpdocNoUselessInheritdocFixer, PhpdocOrderByValueFixer, PhpdocOrderFixer, PhpdocReturnSelfReferenceFixer, PhpdocSeparationFixer, PhpdocSingleLineVarSpacingFixer, PhpdocSummaryFixer, PhpdocTagCasingFixer, PhpdocTagTypeFixer, PhpdocToCommentFixer, PhpdocToParamTypeFixer, PhpdocToReturnTypeFixer, PhpdocTrimConsecutiveBlankLineSeparationFixer, PhpdocTrimFixer, PhpdocTypesOrderFixer, PhpdocVarAnnotationCorrectOrderFixer, PhpdocVarWithoutNameFixer.
+     * Must run after AlignMultilineCommentFixer.
      */
     public function getPriority()
     {

+ 1 - 1
src/Fixer/ControlStructure/ElseifFixer.php

@@ -44,7 +44,7 @@ final class ElseifFixer extends AbstractFixer
      */
     public function getPriority()
     {
-        return 0;
+        return 40;
     }
 
     /**

+ 1 - 1
src/Fixer/ControlStructure/NoAlternativeSyntaxFixer.php

@@ -62,7 +62,7 @@ final class NoAlternativeSyntaxFixer extends AbstractFixer
      */
     public function getPriority()
     {
-        return 26;
+        return 42;
     }
 
     /**

+ 1 - 1
src/Fixer/ControlStructure/NoUnneededCurlyBracesFixer.php

@@ -65,7 +65,7 @@ namespace Foo {
      */
     public function getPriority()
     {
-        return 26;
+        return 40;
     }
 
     /**

+ 1 - 1
src/Fixer/FunctionNotation/CombineNestedDirnameFixer.php

@@ -67,7 +67,7 @@ final class CombineNestedDirnameFixer extends AbstractFixer
      */
     public function getPriority()
     {
-        return 3;
+        return 35;
     }
 
     /**

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