Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PhpdocFullyQualifiedTypesFixer #3644

Closed
wants to merge 11 commits into from
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1578,6 +1578,10 @@ Choose from the list of available rules:

PHPDoc annotation descriptions should not be a sentence.

* **phpdoc_fully_qualified_types**

Transforms imported FQCN in docblocks to short version.

* **phpdoc_indent** [@Symfony, @PhpCsFixer]

Docblocks should have the same indentation as the documented subject.
Expand Down
24 changes: 12 additions & 12 deletions src/AbstractPhpdocTypesFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,20 @@ public function isCandidate(Tokens $tokens)
*/
protected function applyFix(\SplFileInfo $file, Tokens $tokens)
{
foreach ($tokens as $index => $token) {
if (!$token->isGivenKind(T_DOC_COMMENT)) {
for ($index = \count($tokens) - 1; $index >= 0; --$index) {
if (!$tokens[$index]->isGivenKind(T_DOC_COMMENT)) {
continue;
}

$doc = new DocBlock($token->getContent());
$doc = new DocBlock($tokens[$index]->getContent());
$annotations = $doc->getAnnotationsOfType($this->tags);

if (empty($annotations)) {
continue;
}

foreach ($annotations as $annotation) {
$this->fixTypes($annotation);
$this->fixTypes($tokens, $annotation);
}

$tokens[$index] = new Token([T_DOC_COMMENT, $doc->getContent()]);
Expand All @@ -83,7 +83,7 @@ protected function applyFix(\SplFileInfo $file, Tokens $tokens)
*
* @return string
*/
abstract protected function normalize($type);
abstract protected function normalize(Tokens $tokens, $type);

/**
* Fix the types at the given line.
Expand All @@ -92,11 +92,11 @@ abstract protected function normalize($type);
*
* This will be nicely handled behind the scenes for us by the annotation class.
*/
private function fixTypes(Annotation $annotation)
private function fixTypes(Tokens $tokens, Annotation $annotation)
{
$types = $annotation->getTypes();

$new = $this->normalizeTypes($types);
$new = $this->normalizeTypes($tokens, $types);

if ($types !== $new) {
$annotation->setTypes($new);
Expand All @@ -108,10 +108,10 @@ private function fixTypes(Annotation $annotation)
*
* @return string[]
*/
private function normalizeTypes(array $types)
private function normalizeTypes(Tokens $tokens, array $types)
{
foreach ($types as $index => $type) {
$types[$index] = $this->normalizeType($type);
$types[$index] = $this->normalizeType($tokens, $type);
}

return $types;
Expand All @@ -124,12 +124,12 @@ private function normalizeTypes(array $types)
*
* @return string
*/
private function normalizeType($type)
private function normalizeType(Tokens $tokens, $type)
{
if ('[]' === substr($type, -2)) {
return $this->normalize(substr($type, 0, -2)).'[]';
return $this->normalize($tokens, substr($type, 0, -2)).'[]';
}

return $this->normalize($type);
return $this->normalize($tokens, $type);
}
}
2 changes: 1 addition & 1 deletion src/Fixer/Comment/CommentToPhpdocFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function isRisky()
/**
* {@inheritdoc}
*
* Must run before GeneralPhpdocAnnotationRemoveFixer, NoBlankLinesAfterPhpdocFixer, NoEmptyPhpdocFixer, NoSuperfluousPhpdocTagsFixer, PhpdocAddMissingParamAnnotationFixer, PhpdocAlignFixer, PhpdocAlignFixer, PhpdocAnnotationWithoutDotFixer, PhpdocInlineTagFixer, PhpdocLineSpanFixer, PhpdocNoAccessFixer, PhpdocNoAliasTagFixer, PhpdocNoEmptyReturnFixer, PhpdocNoPackageFixer, PhpdocNoUselessInheritdocFixer, PhpdocOrderByValueFixer, PhpdocOrderFixer, PhpdocReturnSelfReferenceFixer, PhpdocSeparationFixer, PhpdocSingleLineVarSpacingFixer, PhpdocSummaryFixer, PhpdocToCommentFixer, PhpdocToParamTypeFixer, PhpdocToReturnTypeFixer, PhpdocTrimConsecutiveBlankLineSeparationFixer, PhpdocTrimFixer, PhpdocTypesOrderFixer, PhpdocVarAnnotationCorrectOrderFixer, PhpdocVarWithoutNameFixer.
* Must run before GeneralPhpdocAnnotationRemoveFixer, NoBlankLinesAfterPhpdocFixer, NoEmptyPhpdocFixer, NoSuperfluousPhpdocTagsFixer, PhpdocAddMissingParamAnnotationFixer, PhpdocAlignFixer, PhpdocAlignFixer, PhpdocAnnotationWithoutDotFixer, PhpdocFullyQualifiedTypesFixer, PhpdocInlineTagFixer, PhpdocLineSpanFixer, PhpdocNoAccessFixer, PhpdocNoAliasTagFixer, PhpdocNoEmptyReturnFixer, PhpdocNoPackageFixer, PhpdocNoUselessInheritdocFixer, PhpdocOrderByValueFixer, PhpdocOrderFixer, PhpdocReturnSelfReferenceFixer, PhpdocSeparationFixer, PhpdocSingleLineVarSpacingFixer, PhpdocSummaryFixer, PhpdocToCommentFixer, PhpdocToParamTypeFixer, PhpdocToReturnTypeFixer, PhpdocTrimConsecutiveBlankLineSeparationFixer, PhpdocTrimFixer, PhpdocTypesOrderFixer, PhpdocVarAnnotationCorrectOrderFixer, PhpdocVarWithoutNameFixer.
*/
public function getPriority()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Fixer/FunctionNotation/PhpdocToParamTypeFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function isCandidate(Tokens $tokens)
* {@inheritdoc}
*
* Must run before NoSuperfluousPhpdocTagsFixer, PhpdocAlignFixer.
* Must run after CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
* Must run after CommentToPhpdocFixer, PhpdocFullyQualifiedTypesFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
*/
public function getPriority()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Fixer/FunctionNotation/PhpdocToReturnTypeFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function isCandidate(Tokens $tokens)
* {@inheritdoc}
*
* Must run before FullyQualifiedStrictTypesFixer, NoSuperfluousPhpdocTagsFixer, PhpdocAlignFixer, ReturnTypeDeclarationFixer.
* Must run after CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer, PhpdocTypesFixer.
* Must run after CommentToPhpdocFixer, PhpdocFullyQualifiedTypesFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer, PhpdocTypesFixer.
*/
public function getPriority()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Fixer/Phpdoc/GeneralPhpdocAnnotationRemoveFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function foo() {}
* {@inheritdoc}
*
* Must run before NoEmptyPhpdocFixer, PhpdocAlignFixer, PhpdocLineSpanFixer, PhpdocSeparationFixer, PhpdocTrimFixer.
* Must run after CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
* Must run after CommentToPhpdocFixer, PhpdocFullyQualifiedTypesFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
*/
public function getPriority()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Fixer/Phpdoc/NoBlankLinesAfterPhpdocFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class Bar {}
* {@inheritdoc}
*
* Must run before HeaderCommentFixer, PhpdocAlignFixer, SingleBlankLineBeforeNamespaceFixer.
* Must run after CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
* Must run after CommentToPhpdocFixer, PhpdocFullyQualifiedTypesFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
*/
public function getPriority()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Fixer/Phpdoc/NoEmptyPhpdocFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function getDefinition()
* {@inheritdoc}
*
* Must run before NoExtraBlankLinesFixer, NoTrailingWhitespaceFixer, NoWhitespaceInBlankLineFixer, PhpdocAlignFixer.
* Must run after CommentToPhpdocFixer, GeneralPhpdocAnnotationRemoveFixer, NoSuperfluousPhpdocTagsFixer, PhpUnitNoExpectationAnnotationFixer, PhpUnitTestAnnotationFixer, PhpdocAddMissingParamAnnotationFixer, PhpdocIndentFixer, PhpdocNoAccessFixer, PhpdocNoEmptyReturnFixer, PhpdocNoPackageFixer, PhpdocNoUselessInheritdocFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
* Must run after CommentToPhpdocFixer, GeneralPhpdocAnnotationRemoveFixer, NoSuperfluousPhpdocTagsFixer, PhpUnitNoExpectationAnnotationFixer, PhpUnitTestAnnotationFixer, PhpdocAddMissingParamAnnotationFixer, PhpdocFullyQualifiedTypesFixer, PhpdocIndentFixer, PhpdocNoAccessFixer, PhpdocNoEmptyReturnFixer, PhpdocNoPackageFixer, PhpdocNoUselessInheritdocFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
*/
public function getPriority()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Fixer/Phpdoc/NoSuperfluousPhpdocTagsFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function doFoo(Bar $bar, $baz /*, $qux = null */) {}
* {@inheritdoc}
*
* Must run before NoEmptyPhpdocFixer, PhpdocAlignFixer.
* Must run after CommentToPhpdocFixer, FullyQualifiedStrictTypesFixer, PhpdocAddMissingParamAnnotationFixer, PhpdocIndentFixer, PhpdocReturnSelfReferenceFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocToParamTypeFixer, PhpdocToReturnTypeFixer, PhpdocTypesFixer.
* Must run after CommentToPhpdocFixer, FullyQualifiedStrictTypesFixer, PhpdocAddMissingParamAnnotationFixer, PhpdocFullyQualifiedTypesFixer, PhpdocIndentFixer, PhpdocReturnSelfReferenceFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocToParamTypeFixer, PhpdocToReturnTypeFixer, PhpdocTypesFixer.
*/
public function getPriority()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Fixer/Phpdoc/PhpdocAddMissingParamAnnotationFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function f9(string $foo, $bar, $baz) {}
* {@inheritdoc}
*
* Must run before NoEmptyPhpdocFixer, NoSuperfluousPhpdocTagsFixer, PhpdocAlignFixer, PhpdocAlignFixer, PhpdocOrderFixer.
* Must run after CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocNoAliasTagFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
* Must run after CommentToPhpdocFixer, PhpdocFullyQualifiedTypesFixer, PhpdocIndentFixer, PhpdocNoAliasTagFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
*/
public function getPriority()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Fixer/Phpdoc/PhpdocAlignFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public function getDefinition()
/**
* {@inheritdoc}
*
* Must run after CommentToPhpdocFixer, CommentToPhpdocFixer, GeneralPhpdocAnnotationRemoveFixer, NoBlankLinesAfterPhpdocFixer, NoEmptyPhpdocFixer, NoSuperfluousPhpdocTagsFixer, PhpdocAddMissingParamAnnotationFixer, PhpdocAddMissingParamAnnotationFixer, PhpdocAnnotationWithoutDotFixer, PhpdocIndentFixer, PhpdocIndentFixer, PhpdocInlineTagFixer, PhpdocLineSpanFixer, PhpdocNoAccessFixer, PhpdocNoAliasTagFixer, PhpdocNoEmptyReturnFixer, PhpdocNoPackageFixer, PhpdocNoUselessInheritdocFixer, PhpdocOrderByValueFixer, PhpdocOrderFixer, PhpdocReturnSelfReferenceFixer, PhpdocScalarFixer, PhpdocScalarFixer, PhpdocSeparationFixer, PhpdocSingleLineVarSpacingFixer, PhpdocSummaryFixer, PhpdocToCommentFixer, PhpdocToCommentFixer, PhpdocToParamTypeFixer, PhpdocToReturnTypeFixer, PhpdocTrimConsecutiveBlankLineSeparationFixer, PhpdocTrimFixer, PhpdocTypesFixer, PhpdocTypesFixer, PhpdocTypesOrderFixer, PhpdocVarAnnotationCorrectOrderFixer, PhpdocVarWithoutNameFixer.
* Must run after CommentToPhpdocFixer, CommentToPhpdocFixer, GeneralPhpdocAnnotationRemoveFixer, NoBlankLinesAfterPhpdocFixer, NoEmptyPhpdocFixer, NoSuperfluousPhpdocTagsFixer, PhpdocAddMissingParamAnnotationFixer, PhpdocAddMissingParamAnnotationFixer, PhpdocAnnotationWithoutDotFixer, PhpdocFullyQualifiedTypesFixer, PhpdocFullyQualifiedTypesFixer, PhpdocFullyQualifiedTypesFixer, PhpdocIndentFixer, PhpdocIndentFixer, PhpdocInlineTagFixer, PhpdocLineSpanFixer, PhpdocNoAccessFixer, PhpdocNoAliasTagFixer, PhpdocNoEmptyReturnFixer, PhpdocNoPackageFixer, PhpdocNoUselessInheritdocFixer, PhpdocOrderByValueFixer, PhpdocOrderFixer, PhpdocReturnSelfReferenceFixer, PhpdocScalarFixer, PhpdocScalarFixer, PhpdocSeparationFixer, PhpdocSingleLineVarSpacingFixer, PhpdocSummaryFixer, PhpdocToCommentFixer, PhpdocToCommentFixer, PhpdocToParamTypeFixer, PhpdocToReturnTypeFixer, PhpdocTrimConsecutiveBlankLineSeparationFixer, PhpdocTrimFixer, PhpdocTypesFixer, PhpdocTypesFixer, PhpdocTypesOrderFixer, PhpdocVarAnnotationCorrectOrderFixer, PhpdocVarWithoutNameFixer.
*/
public function getPriority()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Fixer/Phpdoc/PhpdocAnnotationWithoutDotFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function foo ($bar) {}
* {@inheritdoc}
*
* Must run before PhpdocAlignFixer.
* Must run after CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
* Must run after CommentToPhpdocFixer, PhpdocFullyQualifiedTypesFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
*/
public function getPriority()
{
Expand Down
80 changes: 80 additions & 0 deletions src/Fixer/Phpdoc/PhpdocFullyQualifiedTypesFixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?php

/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <fabien@symfony.com>
* Dariusz Rumiński <dariusz.ruminski@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/

namespace PhpCsFixer\Fixer\Phpdoc;

use PhpCsFixer\AbstractPhpdocTypesFixer;
use PhpCsFixer\FixerDefinition\CodeSample;
use PhpCsFixer\FixerDefinition\FixerDefinition;
use PhpCsFixer\Tokenizer\Analyzer\Analysis\TypeAnalysis;
use PhpCsFixer\Tokenizer\Resolver\TypeShortNameResolver;
use PhpCsFixer\Tokenizer\Tokens;

/**
* @author Filippo Tessarotto <zoeslam@gmail.com>
*/
final class PhpdocFullyQualifiedTypesFixer extends AbstractPhpdocTypesFixer
{
/**
* {@inheritdoc}
*/
public function getDefinition()
{
return new FixerDefinition(
'Transforms imported FQCN in docblocks to short version.',
[new CodeSample('<?php

use Foo\Bar;

/**
* @param \Foo\Bar $foo
*/
function foo($foo) {}
')]
);
}

/**
* {@inheritdoc}
*
* Must run before GeneralPhpdocAnnotationRemoveFixer, NoBlankLinesAfterPhpdocFixer, NoEmptyPhpdocFixer, NoSuperfluousPhpdocTagsFixer, PhpdocAddMissingParamAnnotationFixer, PhpdocAlignFixer, PhpdocAlignFixer, PhpdocAlignFixer, PhpdocAnnotationWithoutDotFixer, PhpdocInlineTagFixer, PhpdocLineSpanFixer, PhpdocNoAccessFixer, PhpdocNoAliasTagFixer, PhpdocNoEmptyReturnFixer, PhpdocNoPackageFixer, PhpdocNoUselessInheritdocFixer, PhpdocOrderByValueFixer, PhpdocOrderFixer, PhpdocReturnSelfReferenceFixer, PhpdocSeparationFixer, PhpdocSingleLineVarSpacingFixer, PhpdocSummaryFixer, PhpdocToParamTypeFixer, PhpdocToReturnTypeFixer, PhpdocTrimConsecutiveBlankLineSeparationFixer, PhpdocTrimFixer, PhpdocTypesOrderFixer, PhpdocVarAnnotationCorrectOrderFixer, PhpdocVarWithoutNameFixer.
* Must run after CommentToPhpdocFixer, PhpdocScalarFixer.
*/
public function getPriority()
{
/*
* Should be run before all other docblock fixers apart from the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a copy-paste-comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes , I've started from PhpdocScalarFixer and it seemed to me a good idea to retain part of it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, than we should back up this comments claim with priority test fixtures so we no longer need this comment 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, I've added all the priority tests that I've could imaging, and then had to delete most of them except two cause of a test allowing only meaningful priority tests 😃

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is my concern 😃 so a lot PHPDoc fixer claim that they must run before a whole bunch of other fixers, yet creating a priority test to prove it seems not possible.

* phpdoc_to_comment and phpdoc_indent fixer to make sure all fixers
* apply correct indentation to new code they add. This should run
* before alignment of params is done since this fixer might change
* the type and thereby un-aligning the params.
*/
return 14;
}

/**
* {@inheritdoc}
*/
protected function normalize(Tokens $tokens, $type)
{
if (0 !== strpos($type, '\\')) {
return $type;
}

// Dummy start and end indexes, we only need isReservedType result
if ((new TypeAnalysis(substr($type, 1), 1, 2))->isReservedType()) {
Slamdunk marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return $type;
}

return (new TypeShortNameResolver())->resolve($tokens, $type);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there nice way to prevent creating a new instance of new TypeShortNameResolver() for each candidate? (maybe private property of the fixer)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TypeShortNameResolver is a stateless class, and I've read few times @julienfalque to prefer not saving anything privately due to performance reason.

Moreover, FullyQualifiedStrictTypesFixer do the same:

https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/c8afb599858876e95e8ebfcd97812d383fa23f02/src/Fixer/Import/FullyQualifiedStrictTypesFixer.php#L155

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is no longer true

}
}
2 changes: 1 addition & 1 deletion src/Fixer/Phpdoc/PhpdocInlineTagFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function getDefinition()
* {@inheritdoc}
*
* Must run before PhpdocAlignFixer.
* Must run after CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
* Must run after CommentToPhpdocFixer, PhpdocFullyQualifiedTypesFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
*/
public function getPriority()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Fixer/Phpdoc/PhpdocLineSpanFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function getDefinition()
* {@inheritdoc}
*
* Must run before PhpdocAlignFixer.
* Must run after CommentToPhpdocFixer, GeneralPhpdocAnnotationRemoveFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
* Must run after CommentToPhpdocFixer, GeneralPhpdocAnnotationRemoveFixer, PhpdocFullyQualifiedTypesFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
*/
public function getPriority()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Fixer/Phpdoc/PhpdocNoAccessFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Foo
* {@inheritdoc}
*
* Must run before NoEmptyPhpdocFixer, PhpdocAlignFixer, PhpdocOrderFixer, PhpdocSeparationFixer, PhpdocTrimFixer.
* Must run after CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
* Must run after CommentToPhpdocFixer, PhpdocFullyQualifiedTypesFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
*/
public function getPriority()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Fixer/Phpdoc/PhpdocNoAliasTagFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ final class Example
* {@inheritdoc}
*
* Must run before PhpdocAddMissingParamAnnotationFixer, PhpdocAlignFixer, PhpdocSingleLineVarSpacingFixer.
* Must run after CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
* Must run after CommentToPhpdocFixer, PhpdocFullyQualifiedTypesFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
*/
public function getPriority()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Fixer/Phpdoc/PhpdocNoEmptyReturnFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function foo() {}
* {@inheritdoc}
*
* Must run before NoEmptyPhpdocFixer, PhpdocAlignFixer, PhpdocOrderFixer, PhpdocSeparationFixer, PhpdocTrimFixer.
* Must run after CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer, VoidReturnFixer.
* Must run after CommentToPhpdocFixer, PhpdocFullyQualifiedTypesFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer, VoidReturnFixer.
*/
public function getPriority()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Fixer/Phpdoc/PhpdocNoPackageFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Baz
* {@inheritdoc}
*
* Must run before NoEmptyPhpdocFixer, PhpdocAlignFixer, PhpdocOrderFixer, PhpdocSeparationFixer, PhpdocTrimFixer.
* Must run after CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
* Must run after CommentToPhpdocFixer, PhpdocFullyQualifiedTypesFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
*/
public function getPriority()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Fixer/Phpdoc/PhpdocNoUselessInheritdocFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function getDefinition()
* {@inheritdoc}
*
* Must run before NoEmptyPhpdocFixer, NoTrailingWhitespaceInCommentFixer, PhpdocAlignFixer.
* Must run after CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
* Must run after CommentToPhpdocFixer, PhpdocFullyQualifiedTypesFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
*/
public function getPriority()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Fixer/Phpdoc/PhpdocOrderByValueFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ final class MyTest extends \PHPUnit_Framework_TestCase
* {@inheritdoc}
*
* Must run before PhpdocAlignFixer.
* Must run after CommentToPhpdocFixer, PhpUnitFqcnAnnotationFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
* Must run after CommentToPhpdocFixer, PhpUnitFqcnAnnotationFixer, PhpdocFullyQualifiedTypesFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
*/
public function getPriority()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Fixer/Phpdoc/PhpdocOrderFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function getDefinition()
* {@inheritdoc}
*
* Must run before PhpdocAlignFixer, PhpdocSeparationFixer, PhpdocTrimFixer.
* Must run after CommentToPhpdocFixer, PhpdocAddMissingParamAnnotationFixer, PhpdocIndentFixer, PhpdocNoAccessFixer, PhpdocNoEmptyReturnFixer, PhpdocNoPackageFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
* Must run after CommentToPhpdocFixer, PhpdocAddMissingParamAnnotationFixer, PhpdocFullyQualifiedTypesFixer, PhpdocIndentFixer, PhpdocNoAccessFixer, PhpdocNoEmptyReturnFixer, PhpdocNoPackageFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
*/
public function getPriority()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Fixer/Phpdoc/PhpdocReturnSelfReferenceFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function isCandidate(Tokens $tokens)
* {@inheritdoc}
*
* Must run before NoSuperfluousPhpdocTagsFixer, PhpdocAlignFixer.
* Must run after CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
* Must run after CommentToPhpdocFixer, PhpdocFullyQualifiedTypesFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
*/
public function getPriority()
{
Expand Down
Loading