Browse Source

Configure no_superfluous_phpdoc_tags for Symfony

Dariusz Ruminski 5 years ago
parent
commit
d25010b1b7

+ 1 - 1
README.rst

@@ -1109,7 +1109,7 @@ Choose from the list of available rules:
 
   Replaces superfluous ``elseif`` with ``if``.
 
-* **no_superfluous_phpdoc_tags**
+* **no_superfluous_phpdoc_tags** [@Symfony, @PhpCsFixer]
 
   Removes ``@param`` and ``@return`` tags that don't provide any useful
   information.

+ 2 - 5
src/AbstractAlignFixerHelper.php

@@ -56,17 +56,14 @@ abstract class AbstractAlignFixerHelper
     /**
      * Inject into the text placeholders of candidates of vertical alignment.
      *
-     * @param Tokens $tokens
-     * @param int    $startAt
-     * @param int    $endAt
+     * @param int $startAt
+     * @param int $endAt
      */
     abstract protected function injectAlignmentPlaceholders(Tokens $tokens, $startAt, $endAt);
 
     /**
      * Look for group of placeholders, and provide vertical alignment.
      *
-     * @param Tokens $tokens
-     *
      * @return string
      */
     protected function replacePlaceholder(Tokens $tokens)

+ 1 - 4
src/AbstractDoctrineAnnotationFixer.php

@@ -64,8 +64,6 @@ abstract class AbstractDoctrineAnnotationFixer extends AbstractFixer implements
 
     /**
      * Fixes Doctrine annotations from the given PHPDoc style comment.
-     *
-     * @param DoctrineAnnotationTokens $doctrineAnnotationTokens
      */
     abstract protected function fixAnnotations(DoctrineAnnotationTokens $doctrineAnnotationTokens);
 
@@ -196,8 +194,7 @@ abstract class AbstractDoctrineAnnotationFixer extends AbstractFixer implements
     }
 
     /**
-     * @param PhpTokens $tokens
-     * @param int       $index
+     * @param int $index
      *
      * @return bool
      */

+ 0 - 1
src/AbstractFunctionReferenceFixer.php

@@ -35,7 +35,6 @@ abstract class AbstractFunctionReferenceFixer extends AbstractFixer
      * which can be supplied by other methods in this abstract class.
      *
      * @param string   $functionNameToSearch
-     * @param Tokens   $tokens
      * @param int      $start
      * @param null|int $end
      *

+ 3 - 4
src/AbstractLinesBeforeNamespaceFixer.php

@@ -29,10 +29,9 @@ abstract class AbstractLinesBeforeNamespaceFixer extends AbstractFixer implement
     /**
      * Make sure # of line breaks prefixing namespace is within given range.
      *
-     * @param Tokens $tokens
-     * @param int    $index
-     * @param int    $expectedMin min. # of line breaks
-     * @param int    $expectedMax max. # of line breaks
+     * @param int $index
+     * @param int $expectedMin min. # of line breaks
+     * @param int $expectedMax max. # of line breaks
      */
     protected function fixLinesBeforeNamespace(Tokens $tokens, $index, $expectedMin, $expectedMax)
     {

+ 6 - 10
src/AbstractNoUselessElseFixer.php

@@ -29,8 +29,7 @@ abstract class AbstractNoUselessElseFixer extends AbstractFixer
     }
 
     /**
-     * @param Tokens $tokens
-     * @param int    $index
+     * @param int $index
      *
      * @return bool
      */
@@ -91,8 +90,7 @@ abstract class AbstractNoUselessElseFixer extends AbstractFixer
      * [0] First is either T_IF, T_ELSE or T_ELSEIF
      * [1] Last is either '}' or ';' / T_CLOSE_TAG for short notation blocks
      *
-     * @param Tokens $tokens
-     * @param int    $index  T_IF, T_ELSE, T_ELSEIF
+     * @param int $index T_IF, T_ELSE, T_ELSEIF
      *
      * @return int[]
      */
@@ -116,9 +114,8 @@ abstract class AbstractNoUselessElseFixer extends AbstractFixer
     }
 
     /**
-     * @param Tokens $tokens
-     * @param int    $index           Index of the token to check
-     * @param int    $lowerLimitIndex Lower limit index. Since the token to check will always be in a conditional we must stop checking at this index
+     * @param int $index           Index of the token to check
+     * @param int $lowerLimitIndex Lower limit index. Since the token to check will always be in a conditional we must stop checking at this index
      *
      * @return bool
      */
@@ -148,9 +145,8 @@ abstract class AbstractNoUselessElseFixer extends AbstractFixer
      * without {}. Assumes not passing the last `;`/close tag of the statement, not
      * out of range index, etc.
      *
-     * @param Tokens $tokens
-     * @param int    $index           Index of the token to check
-     * @param int    $lowerLimitIndex
+     * @param int $index           Index of the token to check
+     * @param int $lowerLimitIndex
      *
      * @return bool
      */

+ 0 - 2
src/AbstractPhpdocTypesFixer.php

@@ -91,8 +91,6 @@ abstract class AbstractPhpdocTypesFixer extends AbstractFixer
      * We must be super careful not to modify parts of words.
      *
      * This will be nicely handled behind the scenes for us by the annotation class.
-     *
-     * @param Annotation $annotation
      */
     private function fixTypes(Annotation $annotation)
     {

+ 1 - 4
src/Cache/FileCacheManager.php

@@ -56,10 +56,7 @@ final class FileCacheManager implements CacheManagerInterface
     private $cacheDirectory;
 
     /**
-     * @param FileHandlerInterface    $handler
-     * @param SignatureInterface      $signature
-     * @param bool                    $isDryRun
-     * @param null|DirectoryInterface $cacheDirectory
+     * @param bool $isDryRun
      */
     public function __construct(
         FileHandlerInterface $handler,

+ 0 - 3
src/Cache/FileHandlerInterface.php

@@ -29,8 +29,5 @@ interface FileHandlerInterface
      */
     public function read();
 
-    /**
-     * @param CacheInterface $cache
-     */
     public function write(CacheInterface $cache);
 }

+ 0 - 1
src/Cache/Signature.php

@@ -49,7 +49,6 @@ final class Signature implements SignatureInterface
      * @param string $fixerVersion
      * @param string $indent
      * @param string $lineEnding
-     * @param array  $rules
      */
     public function __construct($phpVersion, $fixerVersion, $indent, $lineEnding, array $rules)
     {

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