@@ -11,8 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; |
13 | 13 | |
14 | -class OpeningBraceSameLineUnitTest extends AbstractSniffUnitTest |
|
15 | -{ |
|
14 | +class OpeningBraceSameLineUnitTest extends AbstractSniffUnitTest { |
|
16 | 15 | |
17 | 16 | |
18 | 17 | /** |
@@ -23,8 +22,7 @@ discard block |
||
23 | 22 | * |
24 | 23 | * @return array<int, int> |
25 | 24 | */ |
26 | - public function getErrorList() |
|
27 | - { |
|
25 | + public function getErrorList() { |
|
28 | 26 | |
29 | 27 | return [ |
30 | 28 | 19 => 2, |
@@ -51,8 +49,7 @@ discard block |
||
51 | 49 | * |
52 | 50 | * @return array<int, int> |
53 | 51 | */ |
54 | - public function getWarningList() |
|
55 | - { |
|
52 | + public function getWarningList() { |
|
56 | 53 | return [51 => 1]; |
57 | 54 | |
58 | 55 | }//end getWarningList() |
@@ -15,36 +15,31 @@ discard block |
||
15 | 15 | |
16 | 16 | |
17 | 17 | // These are all incorrect. |
18 | -interface Test_Interface_Bad_A |
|
19 | -{ // There should be no content after the brace. |
|
18 | +interface Test_Interface_Bad_A { |
|
19 | +// There should be no content after the brace. |
|
20 | 20 | } |
21 | 21 | |
22 | -class Test_Class_Bad_A |
|
23 | - { |
|
22 | +class Test_Class_Bad_A { |
|
24 | 23 | } |
25 | 24 | |
26 | -class Test_Class_Bad_B extends Test_Class_Bad_A |
|
27 | - |
|
28 | -{ // There should be no content after the brace. |
|
25 | +class Test_Class_Bad_B extends Test_Class_Bad_A { |
|
26 | +// There should be no content after the brace. |
|
29 | 27 | } |
30 | 28 | |
31 | -class Test_Class_Bad_C implements Test_Interface_Bad_A |
|
32 | - |
|
33 | - |
|
34 | -{ |
|
29 | +class Test_Class_Bad_C implements Test_Interface_Bad_A { |
|
35 | 30 | } |
36 | 31 | |
37 | 32 | // These should all be flagged for wrong whitespace before opening brace. |
38 | -interface Test_Interface_Bad_C { |
|
33 | +interface Test_Interface_Bad_C { |
|
39 | 34 | } |
40 | 35 | |
41 | -class Test_Class_Bad_G { |
|
36 | +class Test_Class_Bad_G { |
|
42 | 37 | } |
43 | 38 | |
44 | -class Test_Class_Bad_H extends Test_Class_Bad_G { |
|
39 | +class Test_Class_Bad_H extends Test_Class_Bad_G { |
|
45 | 40 | } |
46 | 41 | |
47 | -class Test_Class_Bad_I implements Test_Interface_Bad_C{ |
|
42 | +class Test_Class_Bad_I implements Test_Interface_Bad_C { |
|
48 | 43 | } |
49 | 44 | |
50 | 45 | // This one should be flagged as a potential parse error. |
@@ -66,8 +61,7 @@ discard block |
||
66 | 61 | |
67 | 62 | // But this is not. |
68 | 63 | class A_Class_With_Really_Long_Name_3 |
69 | - extends Another_Class_With_A_Really_Long_Name |
|
70 | - { |
|
64 | + extends Another_Class_With_A_Really_Long_Name { |
|
71 | 65 | |
72 | 66 | } |
73 | 67 |
@@ -11,8 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; |
13 | 13 | |
14 | -class DuplicateClassNameUnitTest extends AbstractSniffUnitTest |
|
15 | -{ |
|
14 | +class DuplicateClassNameUnitTest extends AbstractSniffUnitTest { |
|
16 | 15 | |
17 | 16 | |
18 | 17 | /** |
@@ -23,8 +22,7 @@ discard block |
||
23 | 22 | * |
24 | 23 | * @return array<int, int> |
25 | 24 | */ |
26 | - public function getErrorList() |
|
27 | - { |
|
25 | + public function getErrorList() { |
|
28 | 26 | return []; |
29 | 27 | |
30 | 28 | }//end getErrorList() |
@@ -40,8 +38,7 @@ discard block |
||
40 | 38 | * |
41 | 39 | * @return array<int, int> |
42 | 40 | */ |
43 | - public function getWarningList($testFile='') |
|
44 | - { |
|
41 | + public function getWarningList($testFile='') { |
|
45 | 42 | switch ($testFile) { |
46 | 43 | case 'DuplicateClassNameUnitTest.1.inc': |
47 | 44 | return [ |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | -class Test{ |
|
3 | - public function testOne(){ |
|
2 | +class Test { |
|
3 | + public function testOne() { |
|
4 | 4 | ?> |
5 | 5 | <p>some html here</p> |
6 | 6 | <?php |
7 | 7 | } |
8 | 8 | } |
9 | 9 | |
10 | -class Test{ |
|
10 | +class Test { |
|
11 | 11 | |
12 | 12 | } |
@@ -11,8 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; |
13 | 13 | |
14 | -class UnusedFunctionParameterUnitTest extends AbstractSniffUnitTest |
|
15 | -{ |
|
14 | +class UnusedFunctionParameterUnitTest extends AbstractSniffUnitTest { |
|
16 | 15 | |
17 | 16 | |
18 | 17 | /** |
@@ -23,8 +22,7 @@ discard block |
||
23 | 22 | * |
24 | 23 | * @return array<int, int> |
25 | 24 | */ |
26 | - public function getErrorList() |
|
27 | - { |
|
25 | + public function getErrorList() { |
|
28 | 26 | return []; |
29 | 27 | |
30 | 28 | }//end getErrorList() |
@@ -38,8 +36,7 @@ discard block |
||
38 | 36 | * |
39 | 37 | * @return array<int, int> |
40 | 38 | */ |
41 | - public function getWarningList() |
|
42 | - { |
|
39 | + public function getWarningList() { |
|
43 | 40 | return [ |
44 | 41 | 3 => 1, |
45 | 42 | 7 => 1, |
@@ -11,8 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; |
13 | 13 | |
14 | -class ForLoopWithTestFunctionCallUnitTest extends AbstractSniffUnitTest |
|
15 | -{ |
|
14 | +class ForLoopWithTestFunctionCallUnitTest extends AbstractSniffUnitTest { |
|
16 | 15 | |
17 | 16 | |
18 | 17 | /** |
@@ -23,8 +22,7 @@ discard block |
||
23 | 22 | * |
24 | 23 | * @return array<int, int> |
25 | 24 | */ |
26 | - public function getErrorList() |
|
27 | - { |
|
25 | + public function getErrorList() { |
|
28 | 26 | return []; |
29 | 27 | |
30 | 28 | }//end getErrorList() |
@@ -38,8 +36,7 @@ discard block |
||
38 | 36 | * |
39 | 37 | * @return array<int, int> |
40 | 38 | */ |
41 | - public function getWarningList() |
|
42 | - { |
|
39 | + public function getWarningList() { |
|
43 | 40 | return [ |
44 | 41 | 4 => 1, |
45 | 42 | 13 => 1, |
@@ -11,8 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; |
13 | 13 | |
14 | -class UselessOverridingMethodUnitTest extends AbstractSniffUnitTest |
|
15 | -{ |
|
14 | +class UselessOverridingMethodUnitTest extends AbstractSniffUnitTest { |
|
16 | 15 | |
17 | 16 | |
18 | 17 | /** |
@@ -23,8 +22,7 @@ discard block |
||
23 | 22 | * |
24 | 23 | * @return array<int, int> |
25 | 24 | */ |
26 | - public function getErrorList() |
|
27 | - { |
|
25 | + public function getErrorList() { |
|
28 | 26 | return []; |
29 | 27 | |
30 | 28 | }//end getErrorList() |
@@ -38,8 +36,7 @@ discard block |
||
38 | 36 | * |
39 | 37 | * @return array<int, int> |
40 | 38 | */ |
41 | - public function getWarningList() |
|
42 | - { |
|
39 | + public function getWarningList() { |
|
43 | 40 | return [ |
44 | 41 | 4 => 1, |
45 | 42 | 16 => 1, |
@@ -11,8 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; |
13 | 13 | |
14 | -class EmptyPHPStatementUnitTest extends AbstractSniffUnitTest |
|
15 | -{ |
|
14 | +class EmptyPHPStatementUnitTest extends AbstractSniffUnitTest { |
|
16 | 15 | |
17 | 16 | |
18 | 17 | /** |
@@ -23,8 +22,7 @@ discard block |
||
23 | 22 | * |
24 | 23 | * @return array<int, int> |
25 | 24 | */ |
26 | - public function getErrorList() |
|
27 | - { |
|
25 | + public function getErrorList() { |
|
28 | 26 | return []; |
29 | 27 | |
30 | 28 | }//end getErrorList() |
@@ -38,8 +36,7 @@ discard block |
||
38 | 36 | * |
39 | 37 | * @return array<int, int> |
40 | 38 | */ |
41 | - public function getWarningList() |
|
42 | - { |
|
39 | + public function getWarningList() { |
|
43 | 40 | return [ |
44 | 41 | 9 => 1, |
45 | 42 | 12 => 1, |
@@ -11,8 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; |
13 | 13 | |
14 | -class UnnecessaryFinalModifierUnitTest extends AbstractSniffUnitTest |
|
15 | -{ |
|
14 | +class UnnecessaryFinalModifierUnitTest extends AbstractSniffUnitTest { |
|
16 | 15 | |
17 | 16 | |
18 | 17 | /** |
@@ -23,8 +22,7 @@ discard block |
||
23 | 22 | * |
24 | 23 | * @return array<int, int> |
25 | 24 | */ |
26 | - public function getErrorList() |
|
27 | - { |
|
25 | + public function getErrorList() { |
|
28 | 26 | return []; |
29 | 27 | |
30 | 28 | }//end getErrorList() |
@@ -38,8 +36,7 @@ discard block |
||
38 | 36 | * |
39 | 37 | * @return array<int, int> |
40 | 38 | */ |
41 | - public function getWarningList() |
|
42 | - { |
|
39 | + public function getWarningList() { |
|
43 | 40 | return [ |
44 | 41 | 11 => 1, |
45 | 42 | 12 => 1, |