Browse Source

minor #5515 DX: do not override getConfigurationDefinition (keradus)

This PR was squashed before being merged into the 2.18 branch.

Discussion
----------

DX: do not override getConfigurationDefinition

Commits
-------

f3a01feb7 DX: do not override getConfigurationDefinition
Dariusz Ruminski 4 years ago
parent
commit
44635508bd

+ 17 - 17
src/Fixer/Operator/OperatorLinebreakFixer.php

@@ -78,23 +78,6 @@ function foo() {
         );
         );
     }
     }
 
 
-    /**
-     * {@inheritdoc}
-     */
-    public function getConfigurationDefinition()
-    {
-        return new FixerConfigurationResolver([
-            (new FixerOptionBuilder('only_booleans', 'whether to limit operators to only boolean ones'))
-                ->setAllowedTypes(['bool'])
-                ->setDefault(false)
-                ->getOption(),
-            (new FixerOptionBuilder('position', 'whether to place operators at the beginning or at the end of the line'))
-                ->setAllowedValues(['beginning', 'end'])
-                ->setDefault($this->position)
-                ->getOption(),
-        ]);
-    }
-
     /**
     /**
      * {@inheritdoc}
      * {@inheritdoc}
      */
      */
@@ -121,6 +104,23 @@ function foo() {
         return true;
         return true;
     }
     }
 
 
+    /**
+     * {@inheritdoc}
+     */
+    protected function createConfigurationDefinition()
+    {
+        return new FixerConfigurationResolver([
+            (new FixerOptionBuilder('only_booleans', 'whether to limit operators to only boolean ones'))
+                ->setAllowedTypes(['bool'])
+                ->setDefault(false)
+                ->getOption(),
+            (new FixerOptionBuilder('position', 'whether to place operators at the beginning or at the end of the line'))
+                ->setAllowedValues(['beginning', 'end'])
+                ->setDefault($this->position)
+                ->getOption(),
+        ]);
+    }
+
     /**
     /**
      * {@inheritdoc}
      * {@inheritdoc}
      */
      */

+ 5 - 5
src/Fixer/Whitespace/NoExtraConsecutiveBlankLinesFixer.php

@@ -41,11 +41,6 @@ final class NoExtraConsecutiveBlankLinesFixer extends AbstractProxyFixer impleme
         $this->configuration = $configuration;
         $this->configuration = $configuration;
     }
     }
 
 
-    public function getConfigurationDefinition()
-    {
-        return $this->getFixer()->getConfigurationDefinition();
-    }
-
     /**
     /**
      * {@inheritdoc}
      * {@inheritdoc}
      */
      */
@@ -54,6 +49,11 @@ final class NoExtraConsecutiveBlankLinesFixer extends AbstractProxyFixer impleme
         return array_keys($this->proxyFixers);
         return array_keys($this->proxyFixers);
     }
     }
 
 
+    protected function createConfigurationDefinition()
+    {
+        return $this->getFixer()->createConfigurationDefinition();
+    }
+
     /**
     /**
      * {@inheritdoc}
      * {@inheritdoc}
      */
      */