Skip to content

Commit f031f23

Browse files
committed
minor #4585 Fix deprecation notices (julienfalque)
This PR was merged into the 2.15 branch. Discussion ---------- Fix deprecation notices Commits ------- c81295c Fix deprecation notices
2 parents 681e7f9 + c81295c commit f031f23

File tree

4 files changed

+70
-70
lines changed

4 files changed

+70
-70
lines changed

tests/Fixer/ClassNotation/ClassDefinitionFixerTest.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public function testInvalidConfigurationValueType()
150150
);
151151

152152
$fixer = new ClassDefinitionFixer();
153-
$fixer->configure(['singleLine' => 'z']);
153+
$fixer->configure(['single_line' => 'z']);
154154
}
155155

156156
public function provideAnonymousClassesCases()
@@ -163,7 +163,7 @@ public function provideAnonymousClassesCases()
163163
[
164164
'<?php $a = new class(1) extends SomeClass implements SomeInterface, D {};',
165165
"<?php \$a = new class(1) extends\nSomeClass\timplements SomeInterface, D {};",
166-
['singleLine' => true],
166+
['single_line' => true],
167167
],
168168
[
169169
"<?php \$a = new class('1a') implements\nA\n{};",
@@ -172,7 +172,7 @@ public function provideAnonymousClassesCases()
172172
[
173173
"<?php \$a = new class('1a') implements A {};",
174174
"<?php \$a = new class('1a') implements\nA{};",
175-
['singleItemSingleLine' => true],
175+
['single_item_single_line' => true],
176176
],
177177
[
178178
'<?php $a = new class {};',
@@ -289,7 +289,7 @@ class#
289289
#
290290
}#
291291
;",
292-
['singleItemSingleLine' => true],
292+
['single_item_single_line' => true],
293293
],
294294
[
295295
'<?php $a = new class() #
@@ -315,45 +315,45 @@ public function provideClassesWithConfigCases()
315315
[
316316
"<?php class configA implements B, C\n{}",
317317
"<?php class configA implements\nB, C{}",
318-
['singleLine' => true],
318+
['single_line' => true],
319319
],
320320
[
321321
"<?php class configA1 extends B\n{}",
322322
"<?php class configA1\n extends\nB{}",
323-
['singleLine' => true],
323+
['single_line' => true],
324324
],
325325
[
326326
"<?php class configA1a extends B\n{}",
327327
"<?php class configA1a\n extends\nB{}",
328-
['singleLine' => false, 'singleItemSingleLine' => true],
328+
['single_line' => false, 'single_item_single_line' => true],
329329
],
330330
[
331331
"<?php class configA2 extends D implements B, C\n{}",
332332
"<?php class configA2 extends D implements\nB,\nC{}",
333-
['singleLine' => true],
333+
['single_line' => true],
334334
],
335335
[
336336
"<?php class configA3 extends D implements B, C\n{}",
337337
"<?php class configA3\n extends\nD\n\t implements\nB,\nC{}",
338-
['singleLine' => true],
338+
['single_line' => true],
339339
],
340340
[
341341
"<?php class configA4 extends D implements B, #\nC\n{}",
342342
"<?php class configA4\n extends\nD\n\t implements\nB,#\nC{}",
343-
['singleLine' => true],
343+
['single_line' => true],
344344
],
345345
[
346346
"<?php class configA5 implements A\n{}",
347347
"<?php class configA5 implements\nA{}",
348-
['singleLine' => false, 'singleItemSingleLine' => true],
348+
['single_line' => false, 'single_item_single_line' => true],
349349
],
350350
[
351351
"<?php interface TestWithMultiExtendsMultiLine extends\n A,\nAb,\n C,\n D\n{}",
352352
"<?php interface TestWithMultiExtendsMultiLine extends A,\nAb,C,D\n{}",
353353
[
354-
'singleLine' => false,
355-
'singleItemSingleLine' => false,
356-
'multiLineExtendsEachSingleLine' => true,
354+
'single_line' => false,
355+
'single_item_single_line' => false,
356+
'multi_line_extends_each_single_line' => true,
357357
],
358358
],
359359
];

tests/Fixer/Comment/HeaderCommentFixerTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function provideFixCases()
7878
'header' => 'tmp',
7979
'location' => 'after_declare_strict',
8080
'separate' => 'bottom',
81-
'commentType' => 'PHPDoc',
81+
'comment_type' => 'PHPDoc',
8282
],
8383
'<?php
8484
declare(strict_types=1);
@@ -122,7 +122,7 @@ public function provideFixCases()
122122
[
123123
[
124124
'header' => 'new',
125-
'commentType' => 'comment',
125+
'comment_type' => 'comment',
126126
],
127127
'<?php
128128
@@ -138,7 +138,7 @@ public function provideFixCases()
138138
[
139139
[
140140
'header' => 'new',
141-
'commentType' => 'PHPDoc',
141+
'comment_type' => 'PHPDoc',
142142
],
143143
'<?php
144144
@@ -154,7 +154,7 @@ public function provideFixCases()
154154
[
155155
[
156156
'header' => 'def',
157-
'commentType' => 'PHPDoc',
157+
'comment_type' => 'PHPDoc',
158158
],
159159
'<?php
160160
@@ -194,7 +194,7 @@ public function provideFixCases()
194194
[
195195
[
196196
'header' => 'abc',
197-
'commentType' => 'PHPDoc',
197+
'comment_type' => 'PHPDoc',
198198
],
199199
'<?php
200200
@@ -360,14 +360,14 @@ public function provideMisconfigurationCases()
360360
[
361361
[
362362
'header' => '',
363-
'commentType' => 'foo',
363+
'comment_type' => 'foo',
364364
],
365365
'Invalid configuration: The option "comment_type" with value "foo" is invalid. Accepted values are: "PHPDoc", "comment".',
366366
],
367367
[
368368
[
369369
'header' => '',
370-
'commentType' => new \stdClass(),
370+
'comment_type' => new \stdClass(),
371371
],
372372
'Invalid configuration: The option "comment_type" with value stdClass is invalid. Accepted values are: "PHPDoc", "comment".',
373373
],
@@ -399,7 +399,7 @@ public function testHeaderGeneration($expected, $header, $type)
399399
{
400400
$this->configureFixerWithAliasedOptions([
401401
'header' => $header,
402-
'commentType' => $type,
402+
'comment_type' => $type,
403403
]);
404404
$this->doTest(
405405
'<?php
@@ -547,7 +547,7 @@ public function provideMessyWhitespacesCases()
547547
'header' => 'whitemess',
548548
'location' => 'after_declare_strict',
549549
'separate' => 'bottom',
550-
'commentType' => 'PHPDoc',
550+
'comment_type' => 'PHPDoc',
551551
],
552552
"<?php\r\ndeclare(strict_types=1);\r\n/**\r\n * whitemess\r\n */\r\n\r\nnamespace A\\B;\r\n\r\necho 1;",
553553
"<?php\r\ndeclare(strict_types=1);\r\n\r\nnamespace A\\B;\r\n\r\necho 1;",

0 commit comments

Comments
 (0)