Browse Source

minor #4772 NoUnneededFinalMethodFixer - update description (kubawerlos)

This PR was merged into the 2.15 branch.

Discussion
----------

NoUnneededFinalMethodFixer - update description

Follow up to https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/3093.

Pinging @localheinz (as author of mentionend PR), @Slamdunk (as author of the fixer) and @peter-gribanov (as reporter od the [issue](https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/4771)) for review.

Commits
-------

1b9cab09 NoUnneededFinalMethodFixer - update description
SpacePossum 5 years ago
parent
commit
634a7654ba
2 changed files with 3 additions and 2 deletions
  1. 2 1
      README.rst
  2. 1 1
      src/Fixer/ClassNotation/NoUnneededFinalMethodFixer.php

+ 2 - 1
README.rst

@@ -1154,7 +1154,8 @@ Choose from the list of available rules:
 
 * **no_unneeded_final_method** [@Symfony, @PhpCsFixer]
 
-  A final class must not have final methods.
+  A ``final`` class must not have ``final`` methods and ``private`` method must
+  not be ``final``.
 
 * **no_unreachable_default_argument_value** [@PhpCsFixer:risky]
 

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

@@ -28,7 +28,7 @@ final class NoUnneededFinalMethodFixer extends AbstractFixer
     public function getDefinition()
     {
         return new FixerDefinition(
-            'A final class must not have final methods.',
+            'A `final` class must not have `final` methods and `private` method must not be `final`.',
             [
                 new CodeSample(
                     '<?php