Просмотр исходного кода

NoUnneededFinalMethodFixer - update description

Kuba Werłos 5 лет назад
Родитель
Сommit
1b9cab091c
2 измененных файлов с 3 добавлено и 2 удалено
  1. 2 1
      README.rst
  2. 1 1
      src/Fixer/ClassNotation/NoUnneededFinalMethodFixer.php

+ 2 - 1
README.rst

@@ -1153,7 +1153,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