@@ -28,32 +28,25 @@ class ExampleClass extends BaseExample implements ExampleInterface
2828 private $self;
2929
3030 /** someMethod phpDoc */
31- public function someMethod()
32- {
33- //code...
34- }
31+ public function someMethod() {}
3532
3633 public static function notConstructor(): SomeType
3734 {
38- //code without 'self' return type
3935 }
4036
4137 final public static function staticConstructor(array $data): BaseExample
4238 {
43- //return new self()
4439 }
4540
4641 /**
4742 * Static constructor with phpDoc
4843 */
4944 public static function fromData(array $data): self
5045 {
51- //return new self()
5246 }
5347
5448 public static function staticInterfaceConstructor(array $data): ExampleInterface
5549 {
56- //return new self()
5750 }
5851 }
5952
@@ -67,33 +60,26 @@ class ExampleClass extends BaseExample implements ExampleInterface
6760
6861 public static function notConstructor(): SomeType
6962 {
70- //code without 'self' return type
7163 }
7264
7365 final public static function staticConstructor(array $data): BaseExample
7466 {
75- //return new self()
7667 }
7768
7869 /**
7970 * Static constructor with phpDoc
8071 */
8172 public static function fromData(array $data): self
8273 {
83- //return new self()
8474 }
8575
8676 public static function staticInterfaceConstructor(array $data): ExampleInterface
8777 {
88- //return new self()
8978 }
9079 private $self;
9180
9281 /** someMethod phpDoc */
93- public function someMethod()
94- {
95- //code...
96- }
82+ public function someMethod() {}
9783 }
9884
9985 CODE;
@@ -108,36 +94,33 @@ public function testClassWithTestNameIsOrderedWithTestConfig()
10894
10995 class ExampleClassTest extends BaseExample implements ExampleInterface
11096 {
111- public static function notConstructor(): SomeType
112- {
113- //code without 'self' return type
114- }
97+ public static function notConstructor(): SomeType {}
11598
11699 private $self;
117100
118101 /** someMethod phpDoc */
119- public function someMethod()
120- {
121- //code...
122- }
102+ public function someMethod() {}
123103
124- final public static function staticConstructor(array $data): BaseExample
125- {
126- //return new self()
127- }
104+ private function getTestedClass(): ExampleClass {}
105+
106+ public static function tearDownAfterClass(): void {}
107+
108+ protected function tearDown(): void {}
109+
110+ private static function assertSomething(): void {}
111+
112+ protected static function staticConstructor(array $data): BaseExample {}
113+
114+ public static function setUpBeforeClass(): void {}
128115
129116 /**
130117 * Static constructor with phpDoc
131118 */
132- public static function fromData(array $data): self
133- {
134- //return new self()
135- }
119+ public static function fromData(array $data): self {}
136120
137- public static function staticInterfaceConstructor(array $data): ExampleInterface
138- {
139- //return new self()
140- }
121+ public function test_Instantiation() {}
122+
123+ public static function staticInterfaceConstructor(array $data): ExampleInterface {}
141124 }
142125
143126 CODE;
@@ -150,33 +133,30 @@ class ExampleClassTest extends BaseExample implements ExampleInterface
150133
151134 private $self;
152135
136+ public static function setUpBeforeClass(): void {}
137+
138+ public static function tearDownAfterClass(): void {}
139+
140+ protected function tearDown(): void {}
141+
153142 /** someMethod phpDoc */
154- public function someMethod()
155- {
156- //code...
157- }
158- public static function notConstructor(): SomeType
159- {
160- //code without 'self' return type
161- }
143+ public function someMethod() {}
162144
163- final public static function staticConstructor(array $data): BaseExample
164- {
165- //return new self()
166- }
145+ public function test_Instantiation() {}
146+ public static function notConstructor(): SomeType {}
167147
168148 /**
169149 * Static constructor with phpDoc
170150 */
171- public static function fromData(array $data): self
172- {
173- //return new self()
174- }
151+ public static function fromData(array $data): self {}
175152
176- public static function staticInterfaceConstructor(array $data): ExampleInterface
177- {
178- //return new self()
179- }
153+ public static function staticInterfaceConstructor(array $data): ExampleInterface {}
154+
155+ protected static function staticConstructor(array $data): BaseExample {}
156+
157+ private function getTestedClass(): ExampleClass {}
158+
159+ private static function assertSomething(): void {}
180160 }
181161
182162 CODE;
@@ -187,23 +167,21 @@ public static function staticInterfaceConstructor(array $data): ExampleInterface
187167 protected function fixer (): FixerInterface
188168 {
189169 $ srcOrder = [
190- 'use_trait ' , 'case ' ,
191- 'constant_public ' , 'constant_protected ' , 'constant_private ' ,
170+ 'use_trait ' , 'case ' , 'constant_public ' , 'constant_protected ' , 'constant_private ' ,
192171 'property_public_static ' , 'property_protected_static ' , 'property_private_static ' ,
193172 'method_public_static ' , 'method_protected_static ' , 'method_private_static ' ,
194173 'property_public ' , 'property_protected ' , 'property_private ' ,
195- 'construct ' , 'phpunit ' , 'magic ' , 'destruct ' ,
196- 'method_public ' , 'method_protected ' , 'method_private '
174+ 'construct ' , 'magic ' , 'method_public ' , 'destruct ' , 'method_protected ' , 'method_private '
197175 ];
198176
199177 $ testOrder = [
200- 'use_trait ' , 'case ' ,
201- 'constant_public ' , 'constant_protected ' , 'constant_private ' ,
178+ 'use_trait ' , 'constant_public ' , 'constant_protected ' , 'constant_private ' ,
202179 'property_public_static ' , 'property_protected_static ' , 'property_private_static ' ,
203180 'property_public ' , 'property_protected ' , 'property_private ' ,
204181 'construct ' , 'phpunit ' , 'magic ' , 'destruct ' ,
205- 'method_public ' , 'method_protected ' , 'method_private ' ,
206- 'method_public_static ' , 'method_protected_static ' , 'method_private_static '
182+ 'method_public ' , 'method_public_static ' ,
183+ 'method_protected ' , 'method_protected_static ' ,
184+ 'method_private ' , 'method_private_static '
207185 ];
208186
209187 return new MultiOrderedClassElementsFixer ($ srcOrder , $ testOrder );
0 commit comments