@@ -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 | - 8 => 1, |
|
30 | - 9 => 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 | + 8 => 1, |
|
30 | + 9 => 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 |
@@ -5,34 +5,34 @@ discard block |
||
5 | 5 | |
6 | 6 | // Errors are thrown from here down from the exit() above. |
7 | 7 | foreach ($vars as $var) { |
8 | - if ($something === TRUE) { |
|
9 | - break; |
|
10 | - break; |
|
11 | - } |
|
8 | + if ($something === TRUE) { |
|
9 | + break; |
|
10 | + break; |
|
11 | + } |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | exit(); |
15 | 15 | |
16 | 16 | function test() { |
17 | - echo 'no error'; |
|
17 | + echo 'no error'; |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | class myClass { |
21 | - function myFunc() { |
|
22 | - echo 'no error'; |
|
23 | - } |
|
21 | + function myFunc() { |
|
22 | + echo 'no error'; |
|
23 | + } |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | function bar() { |
27 | - return function() { |
|
28 | - echo "1"; |
|
29 | - }; |
|
27 | + return function() { |
|
28 | + echo "1"; |
|
29 | + }; |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | class HttpStatus |
33 | 33 | { |
34 | - const CONTINUE = 100; |
|
35 | - const SWITCHING_PROTOCOLS = 101; |
|
34 | + const CONTINUE = 100; |
|
35 | + const SWITCHING_PROTOCOLS = 101; |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | interface ABC { |
@@ -41,15 +41,15 @@ discard block |
||
41 | 41 | |
42 | 42 | trait Something { |
43 | 43 | function getReturnType() { |
44 | - echo 'no error'; |
|
44 | + echo 'no error'; |
|
45 | 45 | } |
46 | 46 | } |
47 | 47 | |
48 | 48 | $a = new class { |
49 | - public function log($msg) |
|
50 | - { |
|
51 | - echo 'no error'; |
|
52 | - } |
|
49 | + public function log($msg) |
|
50 | + { |
|
51 | + echo 'no error'; |
|
52 | + } |
|
53 | 53 | }; |
54 | 54 | |
55 | 55 | interface MyInterface { |
@@ -15,64 +15,64 @@ |
||
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 | - 7 => 1, |
|
30 | - 12 => 1, |
|
31 | - 18 => 1, |
|
32 | - 19 => 2, |
|
33 | - 20 => 1, |
|
34 | - 21 => 1, |
|
35 | - 22 => 3, |
|
36 | - 24 => 1, |
|
37 | - 26 => 1, |
|
38 | - 29 => 1, |
|
39 | - 30 => 1, |
|
40 | - 31 => 1, |
|
41 | - 34 => 1, |
|
42 | - 36 => 1, |
|
43 | - 40 => 1, |
|
44 | - 41 => 1, |
|
45 | - 44 => 1, |
|
46 | - 45 => 1, |
|
47 | - 49 => 1, |
|
48 | - 59 => 1, |
|
49 | - 63 => 1, |
|
50 | - 93 => 1, |
|
51 | - 94 => 2, |
|
52 | - 100 => 1, |
|
53 | - 102 => 1, |
|
54 | - 112 => 1, |
|
55 | - 113 => 1, |
|
56 | - 116 => 1, |
|
57 | - 117 => 1, |
|
58 | - ]; |
|
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 | + 7 => 1, |
|
30 | + 12 => 1, |
|
31 | + 18 => 1, |
|
32 | + 19 => 2, |
|
33 | + 20 => 1, |
|
34 | + 21 => 1, |
|
35 | + 22 => 3, |
|
36 | + 24 => 1, |
|
37 | + 26 => 1, |
|
38 | + 29 => 1, |
|
39 | + 30 => 1, |
|
40 | + 31 => 1, |
|
41 | + 34 => 1, |
|
42 | + 36 => 1, |
|
43 | + 40 => 1, |
|
44 | + 41 => 1, |
|
45 | + 44 => 1, |
|
46 | + 45 => 1, |
|
47 | + 49 => 1, |
|
48 | + 59 => 1, |
|
49 | + 63 => 1, |
|
50 | + 93 => 1, |
|
51 | + 94 => 2, |
|
52 | + 100 => 1, |
|
53 | + 102 => 1, |
|
54 | + 112 => 1, |
|
55 | + 113 => 1, |
|
56 | + 116 => 1, |
|
57 | + 117 => 1, |
|
58 | + ]; |
|
59 | 59 | |
60 | - }//end getErrorList() |
|
60 | + }//end getErrorList() |
|
61 | 61 | |
62 | 62 | |
63 | - /** |
|
64 | - * Returns the lines where warnings should occur. |
|
65 | - * |
|
66 | - * The key of the array should represent the line number and the value |
|
67 | - * should represent the number of warnings that should occur on that line. |
|
68 | - * |
|
69 | - * @return array<int, int> |
|
70 | - */ |
|
71 | - public function getWarningList() |
|
72 | - { |
|
73 | - return []; |
|
63 | + /** |
|
64 | + * Returns the lines where warnings should occur. |
|
65 | + * |
|
66 | + * The key of the array should represent the line number and the value |
|
67 | + * should represent the number of warnings that should occur on that line. |
|
68 | + * |
|
69 | + * @return array<int, int> |
|
70 | + */ |
|
71 | + public function getWarningList() |
|
72 | + { |
|
73 | + return []; |
|
74 | 74 | |
75 | - }//end getWarningList() |
|
75 | + }//end getWarningList() |
|
76 | 76 | |
77 | 77 | |
78 | 78 | }//end class |
@@ -25,7 +25,7 @@ |
||
25 | 25 | * |
26 | 26 | * @return array<int, int> |
27 | 27 | */ |
28 | - public function getErrorList($testFile='FunctionOpeningBraceSpaceUnitTest.inc') |
|
28 | + public function getErrorList($testFile = 'FunctionOpeningBraceSpaceUnitTest.inc') |
|
29 | 29 | { |
30 | 30 | switch ($testFile) { |
31 | 31 | case 'FunctionOpeningBraceSpaceUnitTest.inc': |
@@ -15,54 +15,54 @@ |
||
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='FunctionOpeningBraceSpaceUnitTest.inc') |
|
29 | - { |
|
30 | - switch ($testFile) { |
|
31 | - case 'FunctionOpeningBraceSpaceUnitTest.inc': |
|
32 | - return [ |
|
33 | - 10 => 1, |
|
34 | - 25 => 1, |
|
35 | - 49 => 1, |
|
36 | - ]; |
|
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='FunctionOpeningBraceSpaceUnitTest.inc') |
|
29 | + { |
|
30 | + switch ($testFile) { |
|
31 | + case 'FunctionOpeningBraceSpaceUnitTest.inc': |
|
32 | + return [ |
|
33 | + 10 => 1, |
|
34 | + 25 => 1, |
|
35 | + 49 => 1, |
|
36 | + ]; |
|
37 | 37 | |
38 | - case 'FunctionOpeningBraceSpaceUnitTest.js': |
|
39 | - return [ |
|
40 | - 11 => 1, |
|
41 | - 31 => 1, |
|
42 | - 38 => 1, |
|
43 | - 88 => 1, |
|
44 | - ]; |
|
38 | + case 'FunctionOpeningBraceSpaceUnitTest.js': |
|
39 | + return [ |
|
40 | + 11 => 1, |
|
41 | + 31 => 1, |
|
42 | + 38 => 1, |
|
43 | + 88 => 1, |
|
44 | + ]; |
|
45 | 45 | |
46 | - default: |
|
47 | - return []; |
|
48 | - }//end switch |
|
46 | + default: |
|
47 | + return []; |
|
48 | + }//end switch |
|
49 | 49 | |
50 | - }//end getErrorList() |
|
50 | + }//end getErrorList() |
|
51 | 51 | |
52 | 52 | |
53 | - /** |
|
54 | - * Returns the lines where warnings should occur. |
|
55 | - * |
|
56 | - * The key of the array should represent the line number and the value |
|
57 | - * should represent the number of warnings that should occur on that line. |
|
58 | - * |
|
59 | - * @return array<int, int> |
|
60 | - */ |
|
61 | - public function getWarningList() |
|
62 | - { |
|
63 | - return []; |
|
53 | + /** |
|
54 | + * Returns the lines where warnings should occur. |
|
55 | + * |
|
56 | + * The key of the array should represent the line number and the value |
|
57 | + * should represent the number of warnings that should occur on that line. |
|
58 | + * |
|
59 | + * @return array<int, int> |
|
60 | + */ |
|
61 | + public function getWarningList() |
|
62 | + { |
|
63 | + return []; |
|
64 | 64 | |
65 | - }//end getWarningList() |
|
65 | + }//end getWarningList() |
|
66 | 66 | |
67 | 67 | |
68 | 68 | }//end class |
@@ -28,23 +28,23 @@ |
||
28 | 28 | public function getErrorList($testFile='FunctionOpeningBraceSpaceUnitTest.inc') |
29 | 29 | { |
30 | 30 | switch ($testFile) { |
31 | - case 'FunctionOpeningBraceSpaceUnitTest.inc': |
|
32 | - return [ |
|
33 | - 10 => 1, |
|
34 | - 25 => 1, |
|
35 | - 49 => 1, |
|
36 | - ]; |
|
31 | + case 'FunctionOpeningBraceSpaceUnitTest.inc': |
|
32 | + return [ |
|
33 | + 10 => 1, |
|
34 | + 25 => 1, |
|
35 | + 49 => 1, |
|
36 | + ]; |
|
37 | 37 | |
38 | - case 'FunctionOpeningBraceSpaceUnitTest.js': |
|
39 | - return [ |
|
40 | - 11 => 1, |
|
41 | - 31 => 1, |
|
42 | - 38 => 1, |
|
43 | - 88 => 1, |
|
44 | - ]; |
|
38 | + case 'FunctionOpeningBraceSpaceUnitTest.js': |
|
39 | + return [ |
|
40 | + 11 => 1, |
|
41 | + 31 => 1, |
|
42 | + 38 => 1, |
|
43 | + 88 => 1, |
|
44 | + ]; |
|
45 | 45 | |
46 | - default: |
|
47 | - return []; |
|
46 | + default: |
|
47 | + return []; |
|
48 | 48 | }//end switch |
49 | 49 | |
50 | 50 | }//end getErrorList() |
@@ -15,42 +15,42 @@ |
||
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='LogicalOperatorSpacingUnitTest.inc') |
|
29 | - { |
|
30 | - return [ |
|
31 | - 4 => 2, |
|
32 | - 5 => 3, |
|
33 | - 6 => 3, |
|
34 | - 15 => 1, |
|
35 | - 17 => 1, |
|
36 | - ]; |
|
37 | - |
|
38 | - }//end getErrorList() |
|
39 | - |
|
40 | - |
|
41 | - /** |
|
42 | - * Returns the lines where warnings should occur. |
|
43 | - * |
|
44 | - * The key of the array should represent the line number and the value |
|
45 | - * should represent the number of warnings that should occur on that line. |
|
46 | - * |
|
47 | - * @return array<int, int> |
|
48 | - */ |
|
49 | - public function getWarningList() |
|
50 | - { |
|
51 | - return []; |
|
52 | - |
|
53 | - }//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 | + * @param string $testFile The name of the file being tested. |
|
25 | + * |
|
26 | + * @return array<int, int> |
|
27 | + */ |
|
28 | + public function getErrorList($testFile='LogicalOperatorSpacingUnitTest.inc') |
|
29 | + { |
|
30 | + return [ |
|
31 | + 4 => 2, |
|
32 | + 5 => 3, |
|
33 | + 6 => 3, |
|
34 | + 15 => 1, |
|
35 | + 17 => 1, |
|
36 | + ]; |
|
37 | + |
|
38 | + }//end getErrorList() |
|
39 | + |
|
40 | + |
|
41 | + /** |
|
42 | + * Returns the lines where warnings should occur. |
|
43 | + * |
|
44 | + * The key of the array should represent the line number and the value |
|
45 | + * should represent the number of warnings that should occur on that line. |
|
46 | + * |
|
47 | + * @return array<int, int> |
|
48 | + */ |
|
49 | + public function getWarningList() |
|
50 | + { |
|
51 | + return []; |
|
52 | + |
|
53 | + }//end getWarningList() |
|
54 | 54 | |
55 | 55 | |
56 | 56 | }//end class |
@@ -25,7 +25,7 @@ |
||
25 | 25 | * |
26 | 26 | * @return array<int, int> |
27 | 27 | */ |
28 | - public function getErrorList($testFile='LogicalOperatorSpacingUnitTest.inc') |
|
28 | + public function getErrorList($testFile = 'LogicalOperatorSpacingUnitTest.inc') |
|
29 | 29 | { |
30 | 30 | return [ |
31 | 31 | 4 => 2, |
@@ -15,46 +15,46 @@ |
||
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 | - 3 => 1, |
|
30 | - 7 => 1, |
|
31 | - 11 => 1, |
|
32 | - 15 => 1, |
|
33 | - 19 => 1, |
|
34 | - 23 => 1, |
|
35 | - 27 => 1, |
|
36 | - 31 => 1, |
|
37 | - 34 => 1, |
|
38 | - 35 => 1, |
|
39 | - 39 => 1, |
|
40 | - ]; |
|
41 | - |
|
42 | - }//end getErrorList() |
|
43 | - |
|
44 | - |
|
45 | - /** |
|
46 | - * Returns the lines where warnings should occur. |
|
47 | - * |
|
48 | - * The key of the array should represent the line number and the value |
|
49 | - * should represent the number of warnings that should occur on that line. |
|
50 | - * |
|
51 | - * @return array<int, int> |
|
52 | - */ |
|
53 | - public function getWarningList() |
|
54 | - { |
|
55 | - return []; |
|
56 | - |
|
57 | - }//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 | + 3 => 1, |
|
30 | + 7 => 1, |
|
31 | + 11 => 1, |
|
32 | + 15 => 1, |
|
33 | + 19 => 1, |
|
34 | + 23 => 1, |
|
35 | + 27 => 1, |
|
36 | + 31 => 1, |
|
37 | + 34 => 1, |
|
38 | + 35 => 1, |
|
39 | + 39 => 1, |
|
40 | + ]; |
|
41 | + |
|
42 | + }//end getErrorList() |
|
43 | + |
|
44 | + |
|
45 | + /** |
|
46 | + * Returns the lines where warnings should occur. |
|
47 | + * |
|
48 | + * The key of the array should represent the line number and the value |
|
49 | + * should represent the number of warnings that should occur on that line. |
|
50 | + * |
|
51 | + * @return array<int, int> |
|
52 | + */ |
|
53 | + public function getWarningList() |
|
54 | + { |
|
55 | + return []; |
|
56 | + |
|
57 | + }//end getWarningList() |
|
58 | 58 | |
59 | 59 | |
60 | 60 | }//end class |
@@ -7,14 +7,14 @@ |
||
7 | 7 | |
8 | 8 | // Spacing after || below is ignored as it is EOL whitespace. |
9 | 9 | if ($foo || |
10 | - $bar |
|
11 | - && $baz |
|
10 | + $bar |
|
11 | + && $baz |
|
12 | 12 | ) { |
13 | 13 | } |
14 | 14 | |
15 | 15 | if ($foo|| |
16 | - $bar |
|
17 | - &&$baz |
|
16 | + $bar |
|
17 | + &&$baz |
|
18 | 18 | ) { |
19 | 19 | } |
20 | 20 |
@@ -1,9 +1,9 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | if ($foo || $bar) {} |
4 | -if ($foo||$bar && $baz) {} |
|
5 | -if ($foo|| $bar&&$baz) {} |
|
6 | -if ($foo || $bar && $baz) {} |
|
4 | +if ($foo || $bar && $baz) {} |
|
5 | +if ($foo || $bar && $baz) {} |
|
6 | +if ($foo || $bar && $baz) {} |
|
7 | 7 | |
8 | 8 | // Spacing after || below is ignored as it is EOL whitespace. |
9 | 9 | if ($foo || |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | ) { |
13 | 13 | } |
14 | 14 | |
15 | -if ($foo|| |
|
15 | +if ($foo || |
|
16 | 16 | $bar |
17 | 17 | &&$baz |
18 | 18 | ) { |
@@ -25,7 +25,7 @@ |
||
25 | 25 | * |
26 | 26 | * @return array<int, int> |
27 | 27 | */ |
28 | - public function getErrorList($testFile='OperatorSpacingUnitTest.inc') |
|
28 | + public function getErrorList($testFile = 'OperatorSpacingUnitTest.inc') |
|
29 | 29 | { |
30 | 30 | switch ($testFile) { |
31 | 31 | case 'OperatorSpacingUnitTest.inc': |
@@ -15,156 +15,156 @@ |
||
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='OperatorSpacingUnitTest.inc') |
|
29 | - { |
|
30 | - switch ($testFile) { |
|
31 | - case 'OperatorSpacingUnitTest.inc': |
|
32 | - return [ |
|
33 | - 4 => 1, |
|
34 | - 5 => 2, |
|
35 | - 6 => 1, |
|
36 | - 7 => 1, |
|
37 | - 8 => 2, |
|
38 | - 11 => 1, |
|
39 | - 12 => 2, |
|
40 | - 13 => 1, |
|
41 | - 14 => 1, |
|
42 | - 15 => 2, |
|
43 | - 18 => 1, |
|
44 | - 19 => 2, |
|
45 | - 20 => 1, |
|
46 | - 21 => 1, |
|
47 | - 22 => 2, |
|
48 | - 25 => 1, |
|
49 | - 26 => 2, |
|
50 | - 27 => 1, |
|
51 | - 28 => 1, |
|
52 | - 29 => 2, |
|
53 | - 32 => 1, |
|
54 | - 33 => 2, |
|
55 | - 34 => 1, |
|
56 | - 35 => 1, |
|
57 | - 36 => 2, |
|
58 | - 40 => 2, |
|
59 | - 42 => 2, |
|
60 | - 44 => 2, |
|
61 | - 45 => 1, |
|
62 | - 46 => 2, |
|
63 | - 53 => 4, |
|
64 | - 54 => 3, |
|
65 | - 59 => 10, |
|
66 | - 64 => 1, |
|
67 | - 77 => 4, |
|
68 | - 78 => 1, |
|
69 | - 79 => 1, |
|
70 | - 80 => 2, |
|
71 | - 81 => 1, |
|
72 | - 84 => 6, |
|
73 | - 85 => 6, |
|
74 | - 87 => 4, |
|
75 | - 88 => 5, |
|
76 | - 90 => 4, |
|
77 | - 91 => 5, |
|
78 | - 128 => 4, |
|
79 | - 132 => 1, |
|
80 | - 133 => 1, |
|
81 | - 135 => 1, |
|
82 | - 136 => 1, |
|
83 | - 140 => 1, |
|
84 | - 141 => 1, |
|
85 | - 174 => 1, |
|
86 | - 177 => 1, |
|
87 | - 178 => 1, |
|
88 | - 179 => 1, |
|
89 | - 185 => 2, |
|
90 | - 191 => 4, |
|
91 | - 194 => 1, |
|
92 | - 195 => 1, |
|
93 | - 196 => 2, |
|
94 | - 199 => 1, |
|
95 | - 200 => 1, |
|
96 | - 201 => 2, |
|
97 | - 239 => 1, |
|
98 | - 246 => 1, |
|
99 | - 265 => 2, |
|
100 | - 266 => 2, |
|
101 | - 271 => 2, |
|
102 | - ]; |
|
103 | - break; |
|
104 | - case 'OperatorSpacingUnitTest.js': |
|
105 | - return [ |
|
106 | - 4 => 1, |
|
107 | - 5 => 2, |
|
108 | - 6 => 1, |
|
109 | - 7 => 1, |
|
110 | - 8 => 2, |
|
111 | - 11 => 1, |
|
112 | - 12 => 2, |
|
113 | - 13 => 1, |
|
114 | - 14 => 1, |
|
115 | - 15 => 2, |
|
116 | - 18 => 1, |
|
117 | - 19 => 2, |
|
118 | - 20 => 1, |
|
119 | - 21 => 1, |
|
120 | - 22 => 2, |
|
121 | - 25 => 1, |
|
122 | - 26 => 2, |
|
123 | - 27 => 1, |
|
124 | - 28 => 1, |
|
125 | - 29 => 2, |
|
126 | - 32 => 1, |
|
127 | - 33 => 2, |
|
128 | - 34 => 1, |
|
129 | - 35 => 1, |
|
130 | - 36 => 2, |
|
131 | - 40 => 2, |
|
132 | - 42 => 2, |
|
133 | - 44 => 2, |
|
134 | - 45 => 1, |
|
135 | - 46 => 2, |
|
136 | - 55 => 4, |
|
137 | - 65 => 1, |
|
138 | - 66 => 1, |
|
139 | - 68 => 1, |
|
140 | - 69 => 1, |
|
141 | - 73 => 1, |
|
142 | - 74 => 1, |
|
143 | - 100 => 1, |
|
144 | - 103 => 2, |
|
145 | - ]; |
|
146 | - break; |
|
147 | - default: |
|
148 | - return []; |
|
149 | - break; |
|
150 | - }//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='OperatorSpacingUnitTest.inc') |
|
29 | + { |
|
30 | + switch ($testFile) { |
|
31 | + case 'OperatorSpacingUnitTest.inc': |
|
32 | + return [ |
|
33 | + 4 => 1, |
|
34 | + 5 => 2, |
|
35 | + 6 => 1, |
|
36 | + 7 => 1, |
|
37 | + 8 => 2, |
|
38 | + 11 => 1, |
|
39 | + 12 => 2, |
|
40 | + 13 => 1, |
|
41 | + 14 => 1, |
|
42 | + 15 => 2, |
|
43 | + 18 => 1, |
|
44 | + 19 => 2, |
|
45 | + 20 => 1, |
|
46 | + 21 => 1, |
|
47 | + 22 => 2, |
|
48 | + 25 => 1, |
|
49 | + 26 => 2, |
|
50 | + 27 => 1, |
|
51 | + 28 => 1, |
|
52 | + 29 => 2, |
|
53 | + 32 => 1, |
|
54 | + 33 => 2, |
|
55 | + 34 => 1, |
|
56 | + 35 => 1, |
|
57 | + 36 => 2, |
|
58 | + 40 => 2, |
|
59 | + 42 => 2, |
|
60 | + 44 => 2, |
|
61 | + 45 => 1, |
|
62 | + 46 => 2, |
|
63 | + 53 => 4, |
|
64 | + 54 => 3, |
|
65 | + 59 => 10, |
|
66 | + 64 => 1, |
|
67 | + 77 => 4, |
|
68 | + 78 => 1, |
|
69 | + 79 => 1, |
|
70 | + 80 => 2, |
|
71 | + 81 => 1, |
|
72 | + 84 => 6, |
|
73 | + 85 => 6, |
|
74 | + 87 => 4, |
|
75 | + 88 => 5, |
|
76 | + 90 => 4, |
|
77 | + 91 => 5, |
|
78 | + 128 => 4, |
|
79 | + 132 => 1, |
|
80 | + 133 => 1, |
|
81 | + 135 => 1, |
|
82 | + 136 => 1, |
|
83 | + 140 => 1, |
|
84 | + 141 => 1, |
|
85 | + 174 => 1, |
|
86 | + 177 => 1, |
|
87 | + 178 => 1, |
|
88 | + 179 => 1, |
|
89 | + 185 => 2, |
|
90 | + 191 => 4, |
|
91 | + 194 => 1, |
|
92 | + 195 => 1, |
|
93 | + 196 => 2, |
|
94 | + 199 => 1, |
|
95 | + 200 => 1, |
|
96 | + 201 => 2, |
|
97 | + 239 => 1, |
|
98 | + 246 => 1, |
|
99 | + 265 => 2, |
|
100 | + 266 => 2, |
|
101 | + 271 => 2, |
|
102 | + ]; |
|
103 | + break; |
|
104 | + case 'OperatorSpacingUnitTest.js': |
|
105 | + return [ |
|
106 | + 4 => 1, |
|
107 | + 5 => 2, |
|
108 | + 6 => 1, |
|
109 | + 7 => 1, |
|
110 | + 8 => 2, |
|
111 | + 11 => 1, |
|
112 | + 12 => 2, |
|
113 | + 13 => 1, |
|
114 | + 14 => 1, |
|
115 | + 15 => 2, |
|
116 | + 18 => 1, |
|
117 | + 19 => 2, |
|
118 | + 20 => 1, |
|
119 | + 21 => 1, |
|
120 | + 22 => 2, |
|
121 | + 25 => 1, |
|
122 | + 26 => 2, |
|
123 | + 27 => 1, |
|
124 | + 28 => 1, |
|
125 | + 29 => 2, |
|
126 | + 32 => 1, |
|
127 | + 33 => 2, |
|
128 | + 34 => 1, |
|
129 | + 35 => 1, |
|
130 | + 36 => 2, |
|
131 | + 40 => 2, |
|
132 | + 42 => 2, |
|
133 | + 44 => 2, |
|
134 | + 45 => 1, |
|
135 | + 46 => 2, |
|
136 | + 55 => 4, |
|
137 | + 65 => 1, |
|
138 | + 66 => 1, |
|
139 | + 68 => 1, |
|
140 | + 69 => 1, |
|
141 | + 73 => 1, |
|
142 | + 74 => 1, |
|
143 | + 100 => 1, |
|
144 | + 103 => 2, |
|
145 | + ]; |
|
146 | + break; |
|
147 | + default: |
|
148 | + return []; |
|
149 | + break; |
|
150 | + }//end switch |
|
151 | 151 | |
152 | - }//end getErrorList() |
|
152 | + }//end getErrorList() |
|
153 | 153 | |
154 | 154 | |
155 | - /** |
|
156 | - * Returns the lines where warnings should occur. |
|
157 | - * |
|
158 | - * The key of the array should represent the line number and the value |
|
159 | - * should represent the number of warnings that should occur on that line. |
|
160 | - * |
|
161 | - * @return array<int, int> |
|
162 | - */ |
|
163 | - public function getWarningList() |
|
164 | - { |
|
165 | - return []; |
|
155 | + /** |
|
156 | + * Returns the lines where warnings should occur. |
|
157 | + * |
|
158 | + * The key of the array should represent the line number and the value |
|
159 | + * should represent the number of warnings that should occur on that line. |
|
160 | + * |
|
161 | + * @return array<int, int> |
|
162 | + */ |
|
163 | + public function getWarningList() |
|
164 | + { |
|
165 | + return []; |
|
166 | 166 | |
167 | - }//end getWarningList() |
|
167 | + }//end getWarningList() |
|
168 | 168 | |
169 | 169 | |
170 | 170 | }//end class |
@@ -28,125 +28,125 @@ |
||
28 | 28 | public function getErrorList($testFile='OperatorSpacingUnitTest.inc') |
29 | 29 | { |
30 | 30 | switch ($testFile) { |
31 | - case 'OperatorSpacingUnitTest.inc': |
|
32 | - return [ |
|
33 | - 4 => 1, |
|
34 | - 5 => 2, |
|
35 | - 6 => 1, |
|
36 | - 7 => 1, |
|
37 | - 8 => 2, |
|
38 | - 11 => 1, |
|
39 | - 12 => 2, |
|
40 | - 13 => 1, |
|
41 | - 14 => 1, |
|
42 | - 15 => 2, |
|
43 | - 18 => 1, |
|
44 | - 19 => 2, |
|
45 | - 20 => 1, |
|
46 | - 21 => 1, |
|
47 | - 22 => 2, |
|
48 | - 25 => 1, |
|
49 | - 26 => 2, |
|
50 | - 27 => 1, |
|
51 | - 28 => 1, |
|
52 | - 29 => 2, |
|
53 | - 32 => 1, |
|
54 | - 33 => 2, |
|
55 | - 34 => 1, |
|
56 | - 35 => 1, |
|
57 | - 36 => 2, |
|
58 | - 40 => 2, |
|
59 | - 42 => 2, |
|
60 | - 44 => 2, |
|
61 | - 45 => 1, |
|
62 | - 46 => 2, |
|
63 | - 53 => 4, |
|
64 | - 54 => 3, |
|
65 | - 59 => 10, |
|
66 | - 64 => 1, |
|
67 | - 77 => 4, |
|
68 | - 78 => 1, |
|
69 | - 79 => 1, |
|
70 | - 80 => 2, |
|
71 | - 81 => 1, |
|
72 | - 84 => 6, |
|
73 | - 85 => 6, |
|
74 | - 87 => 4, |
|
75 | - 88 => 5, |
|
76 | - 90 => 4, |
|
77 | - 91 => 5, |
|
78 | - 128 => 4, |
|
79 | - 132 => 1, |
|
80 | - 133 => 1, |
|
81 | - 135 => 1, |
|
82 | - 136 => 1, |
|
83 | - 140 => 1, |
|
84 | - 141 => 1, |
|
85 | - 174 => 1, |
|
86 | - 177 => 1, |
|
87 | - 178 => 1, |
|
88 | - 179 => 1, |
|
89 | - 185 => 2, |
|
90 | - 191 => 4, |
|
91 | - 194 => 1, |
|
92 | - 195 => 1, |
|
93 | - 196 => 2, |
|
94 | - 199 => 1, |
|
95 | - 200 => 1, |
|
96 | - 201 => 2, |
|
97 | - 239 => 1, |
|
98 | - 246 => 1, |
|
99 | - 265 => 2, |
|
100 | - 266 => 2, |
|
101 | - 271 => 2, |
|
102 | - ]; |
|
103 | - break; |
|
104 | - case 'OperatorSpacingUnitTest.js': |
|
105 | - return [ |
|
106 | - 4 => 1, |
|
107 | - 5 => 2, |
|
108 | - 6 => 1, |
|
109 | - 7 => 1, |
|
110 | - 8 => 2, |
|
111 | - 11 => 1, |
|
112 | - 12 => 2, |
|
113 | - 13 => 1, |
|
114 | - 14 => 1, |
|
115 | - 15 => 2, |
|
116 | - 18 => 1, |
|
117 | - 19 => 2, |
|
118 | - 20 => 1, |
|
119 | - 21 => 1, |
|
120 | - 22 => 2, |
|
121 | - 25 => 1, |
|
122 | - 26 => 2, |
|
123 | - 27 => 1, |
|
124 | - 28 => 1, |
|
125 | - 29 => 2, |
|
126 | - 32 => 1, |
|
127 | - 33 => 2, |
|
128 | - 34 => 1, |
|
129 | - 35 => 1, |
|
130 | - 36 => 2, |
|
131 | - 40 => 2, |
|
132 | - 42 => 2, |
|
133 | - 44 => 2, |
|
134 | - 45 => 1, |
|
135 | - 46 => 2, |
|
136 | - 55 => 4, |
|
137 | - 65 => 1, |
|
138 | - 66 => 1, |
|
139 | - 68 => 1, |
|
140 | - 69 => 1, |
|
141 | - 73 => 1, |
|
142 | - 74 => 1, |
|
143 | - 100 => 1, |
|
144 | - 103 => 2, |
|
145 | - ]; |
|
146 | - break; |
|
147 | - default: |
|
148 | - return []; |
|
149 | - break; |
|
31 | + case 'OperatorSpacingUnitTest.inc': |
|
32 | + return [ |
|
33 | + 4 => 1, |
|
34 | + 5 => 2, |
|
35 | + 6 => 1, |
|
36 | + 7 => 1, |
|
37 | + 8 => 2, |
|
38 | + 11 => 1, |
|
39 | + 12 => 2, |
|
40 | + 13 => 1, |
|
41 | + 14 => 1, |
|
42 | + 15 => 2, |
|
43 | + 18 => 1, |
|
44 | + 19 => 2, |
|
45 | + 20 => 1, |
|
46 | + 21 => 1, |
|
47 | + 22 => 2, |
|
48 | + 25 => 1, |
|
49 | + 26 => 2, |
|
50 | + 27 => 1, |
|
51 | + 28 => 1, |
|
52 | + 29 => 2, |
|
53 | + 32 => 1, |
|
54 | + 33 => 2, |
|
55 | + 34 => 1, |
|
56 | + 35 => 1, |
|
57 | + 36 => 2, |
|
58 | + 40 => 2, |
|
59 | + 42 => 2, |
|
60 | + 44 => 2, |
|
61 | + 45 => 1, |
|
62 | + 46 => 2, |
|
63 | + 53 => 4, |
|
64 | + 54 => 3, |
|
65 | + 59 => 10, |
|
66 | + 64 => 1, |
|
67 | + 77 => 4, |
|
68 | + 78 => 1, |
|
69 | + 79 => 1, |
|
70 | + 80 => 2, |
|
71 | + 81 => 1, |
|
72 | + 84 => 6, |
|
73 | + 85 => 6, |
|
74 | + 87 => 4, |
|
75 | + 88 => 5, |
|
76 | + 90 => 4, |
|
77 | + 91 => 5, |
|
78 | + 128 => 4, |
|
79 | + 132 => 1, |
|
80 | + 133 => 1, |
|
81 | + 135 => 1, |
|
82 | + 136 => 1, |
|
83 | + 140 => 1, |
|
84 | + 141 => 1, |
|
85 | + 174 => 1, |
|
86 | + 177 => 1, |
|
87 | + 178 => 1, |
|
88 | + 179 => 1, |
|
89 | + 185 => 2, |
|
90 | + 191 => 4, |
|
91 | + 194 => 1, |
|
92 | + 195 => 1, |
|
93 | + 196 => 2, |
|
94 | + 199 => 1, |
|
95 | + 200 => 1, |
|
96 | + 201 => 2, |
|
97 | + 239 => 1, |
|
98 | + 246 => 1, |
|
99 | + 265 => 2, |
|
100 | + 266 => 2, |
|
101 | + 271 => 2, |
|
102 | + ]; |
|
103 | + break; |
|
104 | + case 'OperatorSpacingUnitTest.js': |
|
105 | + return [ |
|
106 | + 4 => 1, |
|
107 | + 5 => 2, |
|
108 | + 6 => 1, |
|
109 | + 7 => 1, |
|
110 | + 8 => 2, |
|
111 | + 11 => 1, |
|
112 | + 12 => 2, |
|
113 | + 13 => 1, |
|
114 | + 14 => 1, |
|
115 | + 15 => 2, |
|
116 | + 18 => 1, |
|
117 | + 19 => 2, |
|
118 | + 20 => 1, |
|
119 | + 21 => 1, |
|
120 | + 22 => 2, |
|
121 | + 25 => 1, |
|
122 | + 26 => 2, |
|
123 | + 27 => 1, |
|
124 | + 28 => 1, |
|
125 | + 29 => 2, |
|
126 | + 32 => 1, |
|
127 | + 33 => 2, |
|
128 | + 34 => 1, |
|
129 | + 35 => 1, |
|
130 | + 36 => 2, |
|
131 | + 40 => 2, |
|
132 | + 42 => 2, |
|
133 | + 44 => 2, |
|
134 | + 45 => 1, |
|
135 | + 46 => 2, |
|
136 | + 55 => 4, |
|
137 | + 65 => 1, |
|
138 | + 66 => 1, |
|
139 | + 68 => 1, |
|
140 | + 69 => 1, |
|
141 | + 73 => 1, |
|
142 | + 74 => 1, |
|
143 | + 100 => 1, |
|
144 | + 103 => 2, |
|
145 | + ]; |
|
146 | + break; |
|
147 | + default: |
|
148 | + return []; |
|
149 | + break; |
|
150 | 150 | }//end switch |
151 | 151 | |
152 | 152 | }//end getErrorList() |
@@ -2,33 +2,33 @@ |
||
2 | 2 | |
3 | 3 | function MyFunction1() |
4 | 4 | { |
5 | - // Some code goes here. |
|
6 | - echo $code; |
|
5 | + // Some code goes here. |
|
6 | + echo $code; |
|
7 | 7 | } |
8 | 8 | |
9 | 9 | function MyFunction2() |
10 | 10 | { |
11 | 11 | |
12 | - // Some code goes here. |
|
13 | - echo $code; |
|
12 | + // Some code goes here. |
|
13 | + echo $code; |
|
14 | 14 | } |
15 | 15 | |
16 | 16 | class MyClass |
17 | 17 | { |
18 | - function MyFunction1() |
|
19 | - { |
|
20 | - // Some code goes here. |
|
21 | - echo $code; |
|
22 | - } |
|
18 | + function MyFunction1() |
|
19 | + { |
|
20 | + // Some code goes here. |
|
21 | + echo $code; |
|
22 | + } |
|
23 | 23 | |
24 | - function MyFunction2() |
|
25 | - { |
|
24 | + function MyFunction2() |
|
25 | + { |
|
26 | 26 | |
27 | - // Some code goes here. |
|
28 | - echo $code; |
|
29 | - } |
|
27 | + // Some code goes here. |
|
28 | + echo $code; |
|
29 | + } |
|
30 | 30 | |
31 | - public function register(); |
|
31 | + public function register(); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | function emptyFunction() |