@@ -15,34 +15,34 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Returns the lines where errors should occur. |
|
20 | - * |
|
21 | - * The key of the array should represent the line number and the value |
|
22 | - * should represent the number of errors that should occur on that line. |
|
23 | - * |
|
24 | - * @return array<int, int> |
|
25 | - */ |
|
26 | - public function getErrorList() |
|
27 | - { |
|
28 | - return [1 => 1]; |
|
29 | - |
|
30 | - }//end getErrorList() |
|
31 | - |
|
32 | - |
|
33 | - /** |
|
34 | - * Returns the lines where warnings should occur. |
|
35 | - * |
|
36 | - * The key of the array should represent the line number and the value |
|
37 | - * should represent the number of warnings that should occur on that line. |
|
38 | - * |
|
39 | - * @return array<int, int> |
|
40 | - */ |
|
41 | - public function getWarningList() |
|
42 | - { |
|
43 | - return []; |
|
44 | - |
|
45 | - }//end getWarningList() |
|
18 | + /** |
|
19 | + * Returns the lines where errors should occur. |
|
20 | + * |
|
21 | + * The key of the array should represent the line number and the value |
|
22 | + * should represent the number of errors that should occur on that line. |
|
23 | + * |
|
24 | + * @return array<int, int> |
|
25 | + */ |
|
26 | + public function getErrorList() |
|
27 | + { |
|
28 | + return [1 => 1]; |
|
29 | + |
|
30 | + }//end getErrorList() |
|
31 | + |
|
32 | + |
|
33 | + /** |
|
34 | + * Returns the lines where warnings should occur. |
|
35 | + * |
|
36 | + * The key of the array should represent the line number and the value |
|
37 | + * should represent the number of warnings that should occur on that line. |
|
38 | + * |
|
39 | + * @return array<int, int> |
|
40 | + */ |
|
41 | + public function getWarningList() |
|
42 | + { |
|
43 | + return []; |
|
44 | + |
|
45 | + }//end getWarningList() |
|
46 | 46 | |
47 | 47 | |
48 | 48 | }//end class |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function getErrorList() |
27 | 27 | { |
28 | - return [1 => 1]; |
|
28 | + return [ 1 => 1 ]; |
|
29 | 29 | |
30 | 30 | }//end getErrorList() |
31 | 31 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | */ |
41 | 41 | public function getWarningList() |
42 | 42 | { |
43 | - return []; |
|
43 | + return [ ]; |
|
44 | 44 | |
45 | 45 | }//end getWarningList() |
46 | 46 |
@@ -11,8 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; |
13 | 13 | |
14 | -class ByteOrderMarkUnitTest extends AbstractSniffUnitTest |
|
15 | -{ |
|
14 | +class ByteOrderMarkUnitTest 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 [1 => 1]; |
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 | |
45 | 42 | }//end getWarningList() |
@@ -15,51 +15,51 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Returns the lines where errors should occur. |
|
20 | - * |
|
21 | - * The key of the array should represent the line number and the value |
|
22 | - * should represent the number of errors that should occur on that line. |
|
23 | - * |
|
24 | - * @param string $testFile The name of the file being tested. |
|
25 | - * |
|
26 | - * @return array<int, int> |
|
27 | - */ |
|
28 | - public function getErrorList($testFile='') |
|
29 | - { |
|
30 | - switch ($testFile) { |
|
31 | - case 'InlineHTMLUnitTest.3.inc': |
|
32 | - return [4 => 1]; |
|
33 | - break; |
|
34 | - case 'InlineHTMLUnitTest.4.inc': |
|
35 | - return [1 => 1]; |
|
36 | - break; |
|
37 | - case 'InlineHTMLUnitTest.7.inc': |
|
38 | - return [1 => 1]; |
|
39 | - break; |
|
40 | - default: |
|
41 | - return []; |
|
42 | - break; |
|
43 | - }//end switch |
|
18 | + /** |
|
19 | + * Returns the lines where errors should occur. |
|
20 | + * |
|
21 | + * The key of the array should represent the line number and the value |
|
22 | + * should represent the number of errors that should occur on that line. |
|
23 | + * |
|
24 | + * @param string $testFile The name of the file being tested. |
|
25 | + * |
|
26 | + * @return array<int, int> |
|
27 | + */ |
|
28 | + public function getErrorList($testFile='') |
|
29 | + { |
|
30 | + switch ($testFile) { |
|
31 | + case 'InlineHTMLUnitTest.3.inc': |
|
32 | + return [4 => 1]; |
|
33 | + break; |
|
34 | + case 'InlineHTMLUnitTest.4.inc': |
|
35 | + return [1 => 1]; |
|
36 | + break; |
|
37 | + case 'InlineHTMLUnitTest.7.inc': |
|
38 | + return [1 => 1]; |
|
39 | + break; |
|
40 | + default: |
|
41 | + return []; |
|
42 | + break; |
|
43 | + }//end switch |
|
44 | 44 | |
45 | - }//end getErrorList() |
|
45 | + }//end getErrorList() |
|
46 | 46 | |
47 | 47 | |
48 | - /** |
|
49 | - * Returns the lines where warnings should occur. |
|
50 | - * |
|
51 | - * The key of the array should represent the line number and the value |
|
52 | - * should represent the number of warnings that should occur on that line. |
|
53 | - * |
|
54 | - * @param string $testFile The name of the file being tested. |
|
55 | - * |
|
56 | - * @return array<int, int> |
|
57 | - */ |
|
58 | - public function getWarningList($testFile='') |
|
59 | - { |
|
60 | - return []; |
|
48 | + /** |
|
49 | + * Returns the lines where warnings should occur. |
|
50 | + * |
|
51 | + * The key of the array should represent the line number and the value |
|
52 | + * should represent the number of warnings that should occur on that line. |
|
53 | + * |
|
54 | + * @param string $testFile The name of the file being tested. |
|
55 | + * |
|
56 | + * @return array<int, int> |
|
57 | + */ |
|
58 | + public function getWarningList($testFile='') |
|
59 | + { |
|
60 | + return []; |
|
61 | 61 | |
62 | - }//end getWarningList() |
|
62 | + }//end getWarningList() |
|
63 | 63 | |
64 | 64 | |
65 | 65 | }//end class |
@@ -28,18 +28,18 @@ |
||
28 | 28 | public function getErrorList($testFile='') |
29 | 29 | { |
30 | 30 | switch ($testFile) { |
31 | - case 'InlineHTMLUnitTest.3.inc': |
|
32 | - return [4 => 1]; |
|
33 | - break; |
|
34 | - case 'InlineHTMLUnitTest.4.inc': |
|
35 | - return [1 => 1]; |
|
36 | - break; |
|
37 | - case 'InlineHTMLUnitTest.7.inc': |
|
38 | - return [1 => 1]; |
|
39 | - break; |
|
40 | - default: |
|
41 | - return []; |
|
42 | - break; |
|
31 | + case 'InlineHTMLUnitTest.3.inc': |
|
32 | + return [4 => 1]; |
|
33 | + break; |
|
34 | + case 'InlineHTMLUnitTest.4.inc': |
|
35 | + return [1 => 1]; |
|
36 | + break; |
|
37 | + case 'InlineHTMLUnitTest.7.inc': |
|
38 | + return [1 => 1]; |
|
39 | + break; |
|
40 | + default: |
|
41 | + return []; |
|
42 | + break; |
|
43 | 43 | }//end switch |
44 | 44 | |
45 | 45 | }//end getErrorList() |
@@ -25,20 +25,20 @@ discard block |
||
25 | 25 | * |
26 | 26 | * @return array<int, int> |
27 | 27 | */ |
28 | - public function getErrorList($testFile='') |
|
28 | + public function getErrorList( $testFile = '' ) |
|
29 | 29 | { |
30 | - switch ($testFile) { |
|
30 | + switch ( $testFile ) { |
|
31 | 31 | case 'InlineHTMLUnitTest.3.inc': |
32 | - return [4 => 1]; |
|
32 | + return [ 4 => 1 ]; |
|
33 | 33 | break; |
34 | 34 | case 'InlineHTMLUnitTest.4.inc': |
35 | - return [1 => 1]; |
|
35 | + return [ 1 => 1 ]; |
|
36 | 36 | break; |
37 | 37 | case 'InlineHTMLUnitTest.7.inc': |
38 | - return [1 => 1]; |
|
38 | + return [ 1 => 1 ]; |
|
39 | 39 | break; |
40 | 40 | default: |
41 | - return []; |
|
41 | + return [ ]; |
|
42 | 42 | break; |
43 | 43 | }//end switch |
44 | 44 | |
@@ -55,9 +55,9 @@ discard block |
||
55 | 55 | * |
56 | 56 | * @return array<int, int> |
57 | 57 | */ |
58 | - public function getWarningList($testFile='') |
|
58 | + public function getWarningList( $testFile = '' ) |
|
59 | 59 | { |
60 | - return []; |
|
60 | + return [ ]; |
|
61 | 61 | |
62 | 62 | }//end getWarningList() |
63 | 63 |
@@ -11,8 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; |
13 | 13 | |
14 | -class InlineHTMLUnitTest extends AbstractSniffUnitTest |
|
15 | -{ |
|
14 | +class InlineHTMLUnitTest extends AbstractSniffUnitTest { |
|
16 | 15 | |
17 | 16 | |
18 | 17 | /** |
@@ -25,8 +24,7 @@ discard block |
||
25 | 24 | * |
26 | 25 | * @return array<int, int> |
27 | 26 | */ |
28 | - public function getErrorList($testFile='') |
|
29 | - { |
|
27 | + public function getErrorList($testFile='') { |
|
30 | 28 | switch ($testFile) { |
31 | 29 | case 'InlineHTMLUnitTest.3.inc': |
32 | 30 | return [4 => 1]; |
@@ -55,8 +53,7 @@ discard block |
||
55 | 53 | * |
56 | 54 | * @return array<int, int> |
57 | 55 | */ |
58 | - public function getWarningList($testFile='') |
|
59 | - { |
|
56 | + public function getWarningList($testFile='') { |
|
60 | 57 | return []; |
61 | 58 | |
62 | 59 | }//end getWarningList() |
@@ -11,8 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; |
13 | 13 | |
14 | -class LowercasedFilenameUnitTest extends AbstractSniffUnitTest |
|
15 | -{ |
|
14 | +class LowercasedFilenameUnitTest 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 [1 => 1]; |
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 | |
45 | 42 | }//end getWarningList() |
@@ -15,34 +15,34 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Returns the lines where errors should occur. |
|
20 | - * |
|
21 | - * The key of the array should represent the line number and the value |
|
22 | - * should represent the number of errors that should occur on that line. |
|
23 | - * |
|
24 | - * @return array<int, int> |
|
25 | - */ |
|
26 | - public function getErrorList() |
|
27 | - { |
|
28 | - return [1 => 1]; |
|
29 | - |
|
30 | - }//end getErrorList() |
|
31 | - |
|
32 | - |
|
33 | - /** |
|
34 | - * Returns the lines where warnings should occur. |
|
35 | - * |
|
36 | - * The key of the array should represent the line number and the value |
|
37 | - * should represent the number of warnings that should occur on that line. |
|
38 | - * |
|
39 | - * @return array<int, int> |
|
40 | - */ |
|
41 | - public function getWarningList() |
|
42 | - { |
|
43 | - return []; |
|
44 | - |
|
45 | - }//end getWarningList() |
|
18 | + /** |
|
19 | + * Returns the lines where errors should occur. |
|
20 | + * |
|
21 | + * The key of the array should represent the line number and the value |
|
22 | + * should represent the number of errors that should occur on that line. |
|
23 | + * |
|
24 | + * @return array<int, int> |
|
25 | + */ |
|
26 | + public function getErrorList() |
|
27 | + { |
|
28 | + return [1 => 1]; |
|
29 | + |
|
30 | + }//end getErrorList() |
|
31 | + |
|
32 | + |
|
33 | + /** |
|
34 | + * Returns the lines where warnings should occur. |
|
35 | + * |
|
36 | + * The key of the array should represent the line number and the value |
|
37 | + * should represent the number of warnings that should occur on that line. |
|
38 | + * |
|
39 | + * @return array<int, int> |
|
40 | + */ |
|
41 | + public function getWarningList() |
|
42 | + { |
|
43 | + return []; |
|
44 | + |
|
45 | + }//end getWarningList() |
|
46 | 46 | |
47 | 47 | |
48 | 48 | }//end class |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function getErrorList() |
27 | 27 | { |
28 | - return [1 => 1]; |
|
28 | + return [ 1 => 1 ]; |
|
29 | 29 | |
30 | 30 | }//end getErrorList() |
31 | 31 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | */ |
41 | 41 | public function getWarningList() |
42 | 42 | { |
43 | - return []; |
|
43 | + return [ ]; |
|
44 | 44 | |
45 | 45 | }//end getWarningList() |
46 | 46 |
@@ -11,8 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; |
13 | 13 | |
14 | -class OneClassPerFileUnitTest extends AbstractSniffUnitTest |
|
15 | -{ |
|
14 | +class OneClassPerFileUnitTest 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 | 6 => 1, |
30 | 28 | 10 => 1, |
@@ -41,8 +39,7 @@ discard block |
||
41 | 39 | * |
42 | 40 | * @return array<int, int> |
43 | 41 | */ |
44 | - public function getWarningList() |
|
45 | - { |
|
42 | + public function getWarningList() { |
|
46 | 43 | return []; |
47 | 44 | |
48 | 45 | }//end getWarningList() |
@@ -15,37 +15,37 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Returns the lines where errors should occur. |
|
20 | - * |
|
21 | - * The key of the array should represent the line number and the value |
|
22 | - * should represent the number of errors that should occur on that line. |
|
23 | - * |
|
24 | - * @return array<int, int> |
|
25 | - */ |
|
26 | - public function getErrorList() |
|
27 | - { |
|
28 | - return [ |
|
29 | - 6 => 1, |
|
30 | - 10 => 1, |
|
31 | - ]; |
|
32 | - |
|
33 | - }//end getErrorList() |
|
34 | - |
|
35 | - |
|
36 | - /** |
|
37 | - * Returns the lines where warnings should occur. |
|
38 | - * |
|
39 | - * The key of the array should represent the line number and the value |
|
40 | - * should represent the number of warnings that should occur on that line. |
|
41 | - * |
|
42 | - * @return array<int, int> |
|
43 | - */ |
|
44 | - public function getWarningList() |
|
45 | - { |
|
46 | - return []; |
|
47 | - |
|
48 | - }//end getWarningList() |
|
18 | + /** |
|
19 | + * Returns the lines where errors should occur. |
|
20 | + * |
|
21 | + * The key of the array should represent the line number and the value |
|
22 | + * should represent the number of errors that should occur on that line. |
|
23 | + * |
|
24 | + * @return array<int, int> |
|
25 | + */ |
|
26 | + public function getErrorList() |
|
27 | + { |
|
28 | + return [ |
|
29 | + 6 => 1, |
|
30 | + 10 => 1, |
|
31 | + ]; |
|
32 | + |
|
33 | + }//end getErrorList() |
|
34 | + |
|
35 | + |
|
36 | + /** |
|
37 | + * Returns the lines where warnings should occur. |
|
38 | + * |
|
39 | + * The key of the array should represent the line number and the value |
|
40 | + * should represent the number of warnings that should occur on that line. |
|
41 | + * |
|
42 | + * @return array<int, int> |
|
43 | + */ |
|
44 | + public function getWarningList() |
|
45 | + { |
|
46 | + return []; |
|
47 | + |
|
48 | + }//end getWarningList() |
|
49 | 49 | |
50 | 50 | |
51 | 51 | }//end class |
@@ -64,7 +64,7 @@ |
||
64 | 64 | */ |
65 | 65 | public function getWarningList() |
66 | 66 | { |
67 | - return []; |
|
67 | + return [ ]; |
|
68 | 68 | |
69 | 69 | }//end getWarningList() |
70 | 70 |
@@ -1,2 +1,1 @@ |
||
1 | 1 | <?php |
2 | -/** Why me? |
@@ -1,2 +1,1 @@ |
||
1 | 1 | <?php |
2 | -/** Why me? |
@@ -1,2 +1,1 @@ |
||
1 | 1 | <?php |
2 | -/** Why me? |
@@ -1,2 +1,1 @@ |
||
1 | 1 | <?php |
2 | -/** Why me? |
@@ -1,2 +1,1 @@ |
||
1 | 1 | <?php |
2 | -/** Why me? |
@@ -3,4 +3,4 @@ |
||
3 | 3 | // Testing that the fixer does not remove superfluous whitespace (not the concern of this sniff). |
4 | 4 | echo 'foo'; |
5 | 5 | |
6 | - |
|
7 | 6 | \ No newline at end of file |
7 | + |
|
8 | 8 | \ No newline at end of file |
@@ -15,93 +15,93 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Get a list of CLI values to set before the file is tested. |
|
20 | - * |
|
21 | - * @param string $testFile The name of the file being tested. |
|
22 | - * @param \PHP_CodeSniffer\Config $config The config data for the test run. |
|
23 | - * |
|
24 | - * @return void |
|
25 | - */ |
|
26 | - public function setCliValues($testFile, $config) |
|
27 | - { |
|
28 | - $config->tabWidth = 4; |
|
18 | + /** |
|
19 | + * Get a list of CLI values to set before the file is tested. |
|
20 | + * |
|
21 | + * @param string $testFile The name of the file being tested. |
|
22 | + * @param \PHP_CodeSniffer\Config $config The config data for the test run. |
|
23 | + * |
|
24 | + * @return void |
|
25 | + */ |
|
26 | + public function setCliValues($testFile, $config) |
|
27 | + { |
|
28 | + $config->tabWidth = 4; |
|
29 | 29 | |
30 | - }//end setCliValues() |
|
30 | + }//end setCliValues() |
|
31 | 31 | |
32 | 32 | |
33 | - /** |
|
34 | - * Returns the lines where errors should occur. |
|
35 | - * |
|
36 | - * The key of the array should represent the line number and the value |
|
37 | - * should represent the number of errors that should occur on that line. |
|
38 | - * |
|
39 | - * @param string $testFile The name of the file being tested. |
|
40 | - * |
|
41 | - * @return array<int, int> |
|
42 | - */ |
|
43 | - public function getErrorList($testFile='') |
|
44 | - { |
|
45 | - switch ($testFile) { |
|
46 | - case 'LineLengthUnitTest.1.inc': |
|
47 | - return [ |
|
48 | - 31 => 1, |
|
49 | - 34 => 1, |
|
50 | - 45 => 1, |
|
51 | - 82 => 1, |
|
52 | - ]; |
|
53 | - break; |
|
54 | - case 'LineLengthUnitTest.2.inc': |
|
55 | - case 'LineLengthUnitTest.3.inc': |
|
56 | - return [7 => 1]; |
|
57 | - break; |
|
58 | - default: |
|
59 | - return []; |
|
60 | - break; |
|
61 | - }//end switch |
|
33 | + /** |
|
34 | + * Returns the lines where errors should occur. |
|
35 | + * |
|
36 | + * The key of the array should represent the line number and the value |
|
37 | + * should represent the number of errors that should occur on that line. |
|
38 | + * |
|
39 | + * @param string $testFile The name of the file being tested. |
|
40 | + * |
|
41 | + * @return array<int, int> |
|
42 | + */ |
|
43 | + public function getErrorList($testFile='') |
|
44 | + { |
|
45 | + switch ($testFile) { |
|
46 | + case 'LineLengthUnitTest.1.inc': |
|
47 | + return [ |
|
48 | + 31 => 1, |
|
49 | + 34 => 1, |
|
50 | + 45 => 1, |
|
51 | + 82 => 1, |
|
52 | + ]; |
|
53 | + break; |
|
54 | + case 'LineLengthUnitTest.2.inc': |
|
55 | + case 'LineLengthUnitTest.3.inc': |
|
56 | + return [7 => 1]; |
|
57 | + break; |
|
58 | + default: |
|
59 | + return []; |
|
60 | + break; |
|
61 | + }//end switch |
|
62 | 62 | |
63 | - }//end getErrorList() |
|
63 | + }//end getErrorList() |
|
64 | 64 | |
65 | 65 | |
66 | - /** |
|
67 | - * Returns the lines where warnings should occur. |
|
68 | - * |
|
69 | - * The key of the array should represent the line number and the value |
|
70 | - * should represent the number of warnings that should occur on that line. |
|
71 | - * |
|
72 | - * @param string $testFile The name of the file being tested. |
|
73 | - * |
|
74 | - * @return array<int, int> |
|
75 | - */ |
|
76 | - public function getWarningList($testFile='') |
|
77 | - { |
|
78 | - switch ($testFile) { |
|
79 | - case 'LineLengthUnitTest.1.inc': |
|
80 | - return [ |
|
81 | - 9 => 1, |
|
82 | - 15 => 1, |
|
83 | - 21 => 1, |
|
84 | - 24 => 1, |
|
85 | - 29 => 1, |
|
86 | - 37 => 1, |
|
87 | - 63 => 1, |
|
88 | - 73 => 1, |
|
89 | - 75 => 1, |
|
90 | - ]; |
|
91 | - break; |
|
92 | - case 'LineLengthUnitTest.2.inc': |
|
93 | - case 'LineLengthUnitTest.3.inc': |
|
94 | - return [6 => 1]; |
|
95 | - break; |
|
96 | - case 'LineLengthUnitTest.4.inc': |
|
97 | - return [10 => 1]; |
|
98 | - break; |
|
99 | - default: |
|
100 | - return []; |
|
101 | - break; |
|
102 | - }//end switch |
|
66 | + /** |
|
67 | + * Returns the lines where warnings should occur. |
|
68 | + * |
|
69 | + * The key of the array should represent the line number and the value |
|
70 | + * should represent the number of warnings that should occur on that line. |
|
71 | + * |
|
72 | + * @param string $testFile The name of the file being tested. |
|
73 | + * |
|
74 | + * @return array<int, int> |
|
75 | + */ |
|
76 | + public function getWarningList($testFile='') |
|
77 | + { |
|
78 | + switch ($testFile) { |
|
79 | + case 'LineLengthUnitTest.1.inc': |
|
80 | + return [ |
|
81 | + 9 => 1, |
|
82 | + 15 => 1, |
|
83 | + 21 => 1, |
|
84 | + 24 => 1, |
|
85 | + 29 => 1, |
|
86 | + 37 => 1, |
|
87 | + 63 => 1, |
|
88 | + 73 => 1, |
|
89 | + 75 => 1, |
|
90 | + ]; |
|
91 | + break; |
|
92 | + case 'LineLengthUnitTest.2.inc': |
|
93 | + case 'LineLengthUnitTest.3.inc': |
|
94 | + return [6 => 1]; |
|
95 | + break; |
|
96 | + case 'LineLengthUnitTest.4.inc': |
|
97 | + return [10 => 1]; |
|
98 | + break; |
|
99 | + default: |
|
100 | + return []; |
|
101 | + break; |
|
102 | + }//end switch |
|
103 | 103 | |
104 | - }//end getWarningList() |
|
104 | + }//end getWarningList() |
|
105 | 105 | |
106 | 106 | |
107 | 107 | }//end class |
@@ -43,21 +43,21 @@ discard block |
||
43 | 43 | public function getErrorList($testFile='') |
44 | 44 | { |
45 | 45 | switch ($testFile) { |
46 | - case 'LineLengthUnitTest.1.inc': |
|
47 | - return [ |
|
48 | - 31 => 1, |
|
49 | - 34 => 1, |
|
50 | - 45 => 1, |
|
51 | - 82 => 1, |
|
52 | - ]; |
|
53 | - break; |
|
54 | - case 'LineLengthUnitTest.2.inc': |
|
55 | - case 'LineLengthUnitTest.3.inc': |
|
56 | - return [7 => 1]; |
|
57 | - break; |
|
58 | - default: |
|
59 | - return []; |
|
60 | - break; |
|
46 | + case 'LineLengthUnitTest.1.inc': |
|
47 | + return [ |
|
48 | + 31 => 1, |
|
49 | + 34 => 1, |
|
50 | + 45 => 1, |
|
51 | + 82 => 1, |
|
52 | + ]; |
|
53 | + break; |
|
54 | + case 'LineLengthUnitTest.2.inc': |
|
55 | + case 'LineLengthUnitTest.3.inc': |
|
56 | + return [7 => 1]; |
|
57 | + break; |
|
58 | + default: |
|
59 | + return []; |
|
60 | + break; |
|
61 | 61 | }//end switch |
62 | 62 | |
63 | 63 | }//end getErrorList() |
@@ -76,29 +76,29 @@ discard block |
||
76 | 76 | public function getWarningList($testFile='') |
77 | 77 | { |
78 | 78 | switch ($testFile) { |
79 | - case 'LineLengthUnitTest.1.inc': |
|
80 | - return [ |
|
81 | - 9 => 1, |
|
82 | - 15 => 1, |
|
83 | - 21 => 1, |
|
84 | - 24 => 1, |
|
85 | - 29 => 1, |
|
86 | - 37 => 1, |
|
87 | - 63 => 1, |
|
88 | - 73 => 1, |
|
89 | - 75 => 1, |
|
90 | - ]; |
|
91 | - break; |
|
92 | - case 'LineLengthUnitTest.2.inc': |
|
93 | - case 'LineLengthUnitTest.3.inc': |
|
94 | - return [6 => 1]; |
|
95 | - break; |
|
96 | - case 'LineLengthUnitTest.4.inc': |
|
97 | - return [10 => 1]; |
|
98 | - break; |
|
99 | - default: |
|
100 | - return []; |
|
101 | - break; |
|
79 | + case 'LineLengthUnitTest.1.inc': |
|
80 | + return [ |
|
81 | + 9 => 1, |
|
82 | + 15 => 1, |
|
83 | + 21 => 1, |
|
84 | + 24 => 1, |
|
85 | + 29 => 1, |
|
86 | + 37 => 1, |
|
87 | + 63 => 1, |
|
88 | + 73 => 1, |
|
89 | + 75 => 1, |
|
90 | + ]; |
|
91 | + break; |
|
92 | + case 'LineLengthUnitTest.2.inc': |
|
93 | + case 'LineLengthUnitTest.3.inc': |
|
94 | + return [6 => 1]; |
|
95 | + break; |
|
96 | + case 'LineLengthUnitTest.4.inc': |
|
97 | + return [10 => 1]; |
|
98 | + break; |
|
99 | + default: |
|
100 | + return []; |
|
101 | + break; |
|
102 | 102 | }//end switch |
103 | 103 | |
104 | 104 | }//end getWarningList() |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * |
24 | 24 | * @return void |
25 | 25 | */ |
26 | - public function setCliValues($testFile, $config) |
|
26 | + public function setCliValues( $testFile, $config ) |
|
27 | 27 | { |
28 | 28 | $config->tabWidth = 4; |
29 | 29 | |
@@ -40,9 +40,9 @@ discard block |
||
40 | 40 | * |
41 | 41 | * @return array<int, int> |
42 | 42 | */ |
43 | - public function getErrorList($testFile='') |
|
43 | + public function getErrorList( $testFile = '' ) |
|
44 | 44 | { |
45 | - switch ($testFile) { |
|
45 | + switch ( $testFile ) { |
|
46 | 46 | case 'LineLengthUnitTest.1.inc': |
47 | 47 | return [ |
48 | 48 | 31 => 1, |
@@ -53,10 +53,10 @@ discard block |
||
53 | 53 | break; |
54 | 54 | case 'LineLengthUnitTest.2.inc': |
55 | 55 | case 'LineLengthUnitTest.3.inc': |
56 | - return [7 => 1]; |
|
56 | + return [ 7 => 1 ]; |
|
57 | 57 | break; |
58 | 58 | default: |
59 | - return []; |
|
59 | + return [ ]; |
|
60 | 60 | break; |
61 | 61 | }//end switch |
62 | 62 | |
@@ -73,9 +73,9 @@ discard block |
||
73 | 73 | * |
74 | 74 | * @return array<int, int> |
75 | 75 | */ |
76 | - public function getWarningList($testFile='') |
|
76 | + public function getWarningList( $testFile = '' ) |
|
77 | 77 | { |
78 | - switch ($testFile) { |
|
78 | + switch ( $testFile ) { |
|
79 | 79 | case 'LineLengthUnitTest.1.inc': |
80 | 80 | return [ |
81 | 81 | 9 => 1, |
@@ -91,13 +91,13 @@ discard block |
||
91 | 91 | break; |
92 | 92 | case 'LineLengthUnitTest.2.inc': |
93 | 93 | case 'LineLengthUnitTest.3.inc': |
94 | - return [6 => 1]; |
|
94 | + return [ 6 => 1 ]; |
|
95 | 95 | break; |
96 | 96 | case 'LineLengthUnitTest.4.inc': |
97 | - return [10 => 1]; |
|
97 | + return [ 10 => 1 ]; |
|
98 | 98 | break; |
99 | 99 | default: |
100 | - return []; |
|
100 | + return [ ]; |
|
101 | 101 | break; |
102 | 102 | }//end switch |
103 | 103 |
@@ -11,8 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; |
13 | 13 | |
14 | -class LineLengthUnitTest extends AbstractSniffUnitTest |
|
15 | -{ |
|
14 | +class LineLengthUnitTest extends AbstractSniffUnitTest { |
|
16 | 15 | |
17 | 16 | |
18 | 17 | /** |
@@ -23,8 +22,7 @@ discard block |
||
23 | 22 | * |
24 | 23 | * @return void |
25 | 24 | */ |
26 | - public function setCliValues($testFile, $config) |
|
27 | - { |
|
25 | + public function setCliValues($testFile, $config) { |
|
28 | 26 | $config->tabWidth = 4; |
29 | 27 | |
30 | 28 | }//end setCliValues() |
@@ -40,8 +38,7 @@ discard block |
||
40 | 38 | * |
41 | 39 | * @return array<int, int> |
42 | 40 | */ |
43 | - public function getErrorList($testFile='') |
|
44 | - { |
|
41 | + public function getErrorList($testFile='') { |
|
45 | 42 | switch ($testFile) { |
46 | 43 | case 'LineLengthUnitTest.1.inc': |
47 | 44 | return [ |
@@ -73,8 +70,7 @@ discard block |
||
73 | 70 | * |
74 | 71 | * @return array<int, int> |
75 | 72 | */ |
76 | - public function getWarningList($testFile='') |
|
77 | - { |
|
73 | + public function getWarningList($testFile='') { |
|
78 | 74 | switch ($testFile) { |
79 | 75 | case 'LineLengthUnitTest.1.inc': |
80 | 76 | return [ |
@@ -15,39 +15,39 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Returns the lines where errors should occur. |
|
20 | - * |
|
21 | - * The key of the array should represent the line number and the value |
|
22 | - * should represent the number of errors that should occur on that line. |
|
23 | - * |
|
24 | - * @return array<int, int> |
|
25 | - */ |
|
26 | - public function getErrorList() |
|
27 | - { |
|
28 | - return [ |
|
29 | - 6 => 1, |
|
30 | - 10 => 1, |
|
31 | - 14 => 1, |
|
32 | - 18 => 1, |
|
33 | - ]; |
|
34 | - |
|
35 | - }//end getErrorList() |
|
36 | - |
|
37 | - |
|
38 | - /** |
|
39 | - * Returns the lines where warnings should occur. |
|
40 | - * |
|
41 | - * The key of the array should represent the line number and the value |
|
42 | - * should represent the number of warnings that should occur on that line. |
|
43 | - * |
|
44 | - * @return array<int, int> |
|
45 | - */ |
|
46 | - public function getWarningList() |
|
47 | - { |
|
48 | - return []; |
|
49 | - |
|
50 | - }//end getWarningList() |
|
18 | + /** |
|
19 | + * Returns the lines where errors should occur. |
|
20 | + * |
|
21 | + * The key of the array should represent the line number and the value |
|
22 | + * should represent the number of errors that should occur on that line. |
|
23 | + * |
|
24 | + * @return array<int, int> |
|
25 | + */ |
|
26 | + public function getErrorList() |
|
27 | + { |
|
28 | + return [ |
|
29 | + 6 => 1, |
|
30 | + 10 => 1, |
|
31 | + 14 => 1, |
|
32 | + 18 => 1, |
|
33 | + ]; |
|
34 | + |
|
35 | + }//end getErrorList() |
|
36 | + |
|
37 | + |
|
38 | + /** |
|
39 | + * Returns the lines where warnings should occur. |
|
40 | + * |
|
41 | + * The key of the array should represent the line number and the value |
|
42 | + * should represent the number of warnings that should occur on that line. |
|
43 | + * |
|
44 | + * @return array<int, int> |
|
45 | + */ |
|
46 | + public function getWarningList() |
|
47 | + { |
|
48 | + return []; |
|
49 | + |
|
50 | + }//end getWarningList() |
|
51 | 51 | |
52 | 52 | |
53 | 53 | }//end class |
@@ -11,8 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; |
13 | 13 | |
14 | -class OneObjectStructurePerFileUnitTest extends AbstractSniffUnitTest |
|
15 | -{ |
|
14 | +class OneObjectStructurePerFileUnitTest 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 | 6 => 1, |
30 | 28 | 10 => 1, |
@@ -43,8 +41,7 @@ discard block |
||
43 | 41 | * |
44 | 42 | * @return array<int, int> |
45 | 43 | */ |
46 | - public function getWarningList() |
|
47 | - { |
|
44 | + public function getWarningList() { |
|
48 | 45 | return []; |
49 | 46 | |
50 | 47 | }//end getWarningList() |
@@ -64,7 +64,7 @@ |
||
64 | 64 | */ |
65 | 65 | public function getWarningList() |
66 | 66 | { |
67 | - return []; |
|
67 | + return [ ]; |
|
68 | 68 | |
69 | 69 | }//end getWarningList() |
70 | 70 |
@@ -15,49 +15,49 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Get a list of CLI values to set before the file is tested. |
|
20 | - * |
|
21 | - * @param string $testFile The name of the file being tested. |
|
22 | - * @param \PHP_CodeSniffer\Config $config The config data for the test run. |
|
23 | - * |
|
24 | - * @return void |
|
25 | - */ |
|
26 | - public function setCliValues($testFile, $config) |
|
27 | - { |
|
28 | - $config->tabWidth = 4; |
|
29 | - |
|
30 | - }//end setCliValues() |
|
31 | - |
|
32 | - |
|
33 | - /** |
|
34 | - * Returns the lines where errors should occur. |
|
35 | - * |
|
36 | - * The key of the array should represent the line number and the value |
|
37 | - * should represent the number of errors that should occur on that line. |
|
38 | - * |
|
39 | - * @return array<int, int> |
|
40 | - */ |
|
41 | - public function getErrorList() |
|
42 | - { |
|
43 | - return [1 => 1]; |
|
44 | - |
|
45 | - }//end getErrorList() |
|
46 | - |
|
47 | - |
|
48 | - /** |
|
49 | - * Returns the lines where warnings should occur. |
|
50 | - * |
|
51 | - * The key of the array should represent the line number and the value |
|
52 | - * should represent the number of warnings that should occur on that line. |
|
53 | - * |
|
54 | - * @return array<int, int> |
|
55 | - */ |
|
56 | - public function getWarningList() |
|
57 | - { |
|
58 | - return []; |
|
59 | - |
|
60 | - }//end getWarningList() |
|
18 | + /** |
|
19 | + * Get a list of CLI values to set before the file is tested. |
|
20 | + * |
|
21 | + * @param string $testFile The name of the file being tested. |
|
22 | + * @param \PHP_CodeSniffer\Config $config The config data for the test run. |
|
23 | + * |
|
24 | + * @return void |
|
25 | + */ |
|
26 | + public function setCliValues($testFile, $config) |
|
27 | + { |
|
28 | + $config->tabWidth = 4; |
|
29 | + |
|
30 | + }//end setCliValues() |
|
31 | + |
|
32 | + |
|
33 | + /** |
|
34 | + * Returns the lines where errors should occur. |
|
35 | + * |
|
36 | + * The key of the array should represent the line number and the value |
|
37 | + * should represent the number of errors that should occur on that line. |
|
38 | + * |
|
39 | + * @return array<int, int> |
|
40 | + */ |
|
41 | + public function getErrorList() |
|
42 | + { |
|
43 | + return [1 => 1]; |
|
44 | + |
|
45 | + }//end getErrorList() |
|
46 | + |
|
47 | + |
|
48 | + /** |
|
49 | + * Returns the lines where warnings should occur. |
|
50 | + * |
|
51 | + * The key of the array should represent the line number and the value |
|
52 | + * should represent the number of warnings that should occur on that line. |
|
53 | + * |
|
54 | + * @return array<int, int> |
|
55 | + */ |
|
56 | + public function getWarningList() |
|
57 | + { |
|
58 | + return []; |
|
59 | + |
|
60 | + }//end getWarningList() |
|
61 | 61 | |
62 | 62 | |
63 | 63 | }//end class |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * |
24 | 24 | * @return void |
25 | 25 | */ |
26 | - public function setCliValues($testFile, $config) |
|
26 | + public function setCliValues( $testFile, $config ) |
|
27 | 27 | { |
28 | 28 | $config->tabWidth = 4; |
29 | 29 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | */ |
41 | 41 | public function getErrorList() |
42 | 42 | { |
43 | - return [1 => 1]; |
|
43 | + return [ 1 => 1 ]; |
|
44 | 44 | |
45 | 45 | }//end getErrorList() |
46 | 46 | |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public function getWarningList() |
57 | 57 | { |
58 | - return []; |
|
58 | + return [ ]; |
|
59 | 59 | |
60 | 60 | }//end getWarningList() |
61 | 61 |
@@ -11,8 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; |
13 | 13 | |
14 | -class LineEndingsUnitTest extends AbstractSniffUnitTest |
|
15 | -{ |
|
14 | +class LineEndingsUnitTest extends AbstractSniffUnitTest { |
|
16 | 15 | |
17 | 16 | |
18 | 17 | /** |
@@ -23,8 +22,7 @@ discard block |
||
23 | 22 | * |
24 | 23 | * @return void |
25 | 24 | */ |
26 | - public function setCliValues($testFile, $config) |
|
27 | - { |
|
25 | + public function setCliValues($testFile, $config) { |
|
28 | 26 | $config->tabWidth = 4; |
29 | 27 | |
30 | 28 | }//end setCliValues() |
@@ -38,8 +36,7 @@ discard block |
||
38 | 36 | * |
39 | 37 | * @return array<int, int> |
40 | 38 | */ |
41 | - public function getErrorList() |
|
42 | - { |
|
39 | + public function getErrorList() { |
|
43 | 40 | return [1 => 1]; |
44 | 41 | |
45 | 42 | }//end getErrorList() |
@@ -53,8 +50,7 @@ discard block |
||
53 | 50 | * |
54 | 51 | * @return array<int, int> |
55 | 52 | */ |
56 | - public function getWarningList() |
|
57 | - { |
|
53 | + public function getWarningList() { |
|
58 | 54 | return []; |
59 | 55 | |
60 | 56 | }//end getWarningList() |