Browse Source

feature: make OrderedInterfacesFixer non-risky (#6722)

Kuba Werłos 2 years ago
parent
commit
f5726f5432

+ 0 - 4
doc/list.rst

@@ -1916,10 +1916,6 @@ List of Available Rules
 
    Orders the interfaces in an ``implements`` or ``interface extends`` clause.
 
-   *warning risky* Risky for ``implements`` when specifying both an interface and its parent
-   interface, because PHP doesn't break on ``parent, child`` but does on
-   ``child, parent``.
-
    Configuration options:
 
    - | ``order``

+ 0 - 10
doc/rules/class_notation/ordered_interfaces.rst

@@ -4,16 +4,6 @@ Rule ``ordered_interfaces``
 
 Orders the interfaces in an ``implements`` or ``interface extends`` clause.
 
-Warning
--------
-
-Using this rule is risky
-~~~~~~~~~~~~~~~~~~~~~~~~
-
-Risky for ``implements`` when specifying both an interface and its parent
-interface, because PHP doesn't break on ``parent, child`` but does on ``child,
-parent``.
-
 Configuration
 -------------
 

+ 1 - 1
doc/rules/index.rst

@@ -178,7 +178,7 @@ Class Notation
 - `ordered_class_elements <./class_notation/ordered_class_elements.rst>`_
 
   Orders the elements of classes/interfaces/traits/enums.
-- `ordered_interfaces <./class_notation/ordered_interfaces.rst>`_ *(risky)*
+- `ordered_interfaces <./class_notation/ordered_interfaces.rst>`_
 
   Orders the interfaces in an ``implements`` or ``interface extends`` clause.
 - `ordered_traits <./class_notation/ordered_traits.rst>`_ *(risky)*

+ 0 - 10
src/Fixer/ClassNotation/OrderedInterfacesFixer.php

@@ -95,8 +95,6 @@ final class OrderedInterfacesFixer extends AbstractFixer implements Configurable
                     ]
                 ),
             ],
-            null,
-            "Risky for `implements` when specifying both an interface and its parent interface, because PHP doesn't break on `parent, child` but does on `child, parent`."
         );
     }
 
@@ -109,14 +107,6 @@ final class OrderedInterfacesFixer extends AbstractFixer implements Configurable
             || $tokens->isAllTokenKindsFound([T_INTERFACE, T_EXTENDS]);
     }
 
-    /**
-     * {@inheritdoc}
-     */
-    public function isRisky(): bool
-    {
-        return true;
-    }
-
     /**
      * {@inheritdoc}
      */