File tree Expand file tree Collapse file tree 2 files changed +22
-22
lines changed
Expand file tree Collapse file tree 2 files changed +22
-22
lines changed Original file line number Diff line number Diff line change @@ -78,23 +78,6 @@ function foo() {
7878 );
7979 }
8080
81- /**
82- * {@inheritdoc}
83- */
84- public function getConfigurationDefinition ()
85- {
86- return new FixerConfigurationResolver ([
87- (new FixerOptionBuilder ('only_booleans ' , 'whether to limit operators to only boolean ones ' ))
88- ->setAllowedTypes (['bool ' ])
89- ->setDefault (false )
90- ->getOption (),
91- (new FixerOptionBuilder ('position ' , 'whether to place operators at the beginning or at the end of the line ' ))
92- ->setAllowedValues (['beginning ' , 'end ' ])
93- ->setDefault ($ this ->position )
94- ->getOption (),
95- ]);
96- }
97-
9881 /**
9982 * {@inheritdoc}
10083 */
@@ -121,6 +104,23 @@ public function isCandidate(Tokens $tokens)
121104 return true ;
122105 }
123106
107+ /**
108+ * {@inheritdoc}
109+ */
110+ protected function createConfigurationDefinition ()
111+ {
112+ return new FixerConfigurationResolver ([
113+ (new FixerOptionBuilder ('only_booleans ' , 'whether to limit operators to only boolean ones ' ))
114+ ->setAllowedTypes (['bool ' ])
115+ ->setDefault (false )
116+ ->getOption (),
117+ (new FixerOptionBuilder ('position ' , 'whether to place operators at the beginning or at the end of the line ' ))
118+ ->setAllowedValues (['beginning ' , 'end ' ])
119+ ->setDefault ($ this ->position )
120+ ->getOption (),
121+ ]);
122+ }
123+
124124 /**
125125 * {@inheritdoc}
126126 */
Original file line number Diff line number Diff line change @@ -41,11 +41,6 @@ public function configure(array $configuration = null)
4141 $ this ->configuration = $ configuration ;
4242 }
4343
44- public function getConfigurationDefinition ()
45- {
46- return $ this ->getFixer ()->getConfigurationDefinition ();
47- }
48-
4944 /**
5045 * {@inheritdoc}
5146 */
@@ -54,6 +49,11 @@ public function getSuccessorsNames()
5449 return array_keys ($ this ->proxyFixers );
5550 }
5651
52+ protected function createConfigurationDefinition ()
53+ {
54+ return $ this ->getFixer ()->createConfigurationDefinition ();
55+ }
56+
5757 /**
5858 * {@inheritdoc}
5959 */
You can’t perform that action at this time.
0 commit comments