@@ -20,9 +20,9 @@ discard block |
||
20 | 20 | */ |
21 | 21 | |
22 | 22 | function test() |
23 | - { |
|
24 | - $arr = array( |
|
25 | - 'a' => 'a' |
|
23 | + { |
|
24 | + $arr = array( |
|
25 | + 'a' => 'a' |
|
26 | 26 | <<<<<<< HEAD |
27 | 27 | 'b' => 'b' |
28 | 28 | ======= |
@@ -57,5 +57,4 @@ discard block |
||
57 | 57 | |
58 | 58 | // Test that stray boundaries, i.e. an opener without closer and such, are detected. |
59 | 59 | <<<<<<< HEAD |
60 | -$a = 1; |
|
61 | -======= |
|
60 | +$a |
|
62 | 61 | \ No newline at end of file |
@@ -15,47 +15,47 @@ |
||
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 | - |
|
29 | - return [ |
|
30 | - 19 => 2, |
|
31 | - 23 => 1, |
|
32 | - 28 => 2, |
|
33 | - 34 => 1, |
|
34 | - 38 => 1, |
|
35 | - 41 => 1, |
|
36 | - 44 => 1, |
|
37 | - 47 => 1, |
|
38 | - 70 => 1, |
|
39 | - 79 => 1, |
|
40 | - 90 => 1, |
|
41 | - ]; |
|
42 | - |
|
43 | - }//end getErrorList() |
|
44 | - |
|
45 | - |
|
46 | - /** |
|
47 | - * Returns the lines where warnings should occur. |
|
48 | - * |
|
49 | - * The key of the array should represent the line number and the value |
|
50 | - * should represent the number of warnings that should occur on that line. |
|
51 | - * |
|
52 | - * @return array<int, int> |
|
53 | - */ |
|
54 | - public function getWarningList() |
|
55 | - { |
|
56 | - return [51 => 1]; |
|
57 | - |
|
58 | - }//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 | + |
|
29 | + return [ |
|
30 | + 19 => 2, |
|
31 | + 23 => 1, |
|
32 | + 28 => 2, |
|
33 | + 34 => 1, |
|
34 | + 38 => 1, |
|
35 | + 41 => 1, |
|
36 | + 44 => 1, |
|
37 | + 47 => 1, |
|
38 | + 70 => 1, |
|
39 | + 79 => 1, |
|
40 | + 90 => 1, |
|
41 | + ]; |
|
42 | + |
|
43 | + }//end getErrorList() |
|
44 | + |
|
45 | + |
|
46 | + /** |
|
47 | + * Returns the lines where warnings should occur. |
|
48 | + * |
|
49 | + * The key of the array should represent the line number and the value |
|
50 | + * should represent the number of warnings that should occur on that line. |
|
51 | + * |
|
52 | + * @return array<int, int> |
|
53 | + */ |
|
54 | + public function getWarningList() |
|
55 | + { |
|
56 | + return [51 => 1]; |
|
57 | + |
|
58 | + }//end getWarningList() |
|
59 | 59 | |
60 | 60 | |
61 | 61 | }//end class |
@@ -52,30 +52,30 @@ discard block |
||
52 | 52 | |
53 | 53 | // This is OK. |
54 | 54 | class A_Class_With_Really_Long_Name |
55 | - extends Another_Class_With_A_Really_Long_Name { |
|
55 | + extends Another_Class_With_A_Really_Long_Name { |
|
56 | 56 | |
57 | 57 | } |
58 | 58 | |
59 | 59 | // This is OK too. |
60 | 60 | class A_Class_With_Really_Long_Name_2 |
61 | - extends Another_Class_With_A_Really_Long_Name |
|
62 | - implements Some_Interface_With_A_Long_Name, |
|
63 | - Another_Interface_With_A_Long_Name { |
|
61 | + extends Another_Class_With_A_Really_Long_Name |
|
62 | + implements Some_Interface_With_A_Long_Name, |
|
63 | + Another_Interface_With_A_Long_Name { |
|
64 | 64 | |
65 | 65 | } |
66 | 66 | |
67 | 67 | // But this is not. |
68 | 68 | class A_Class_With_Really_Long_Name_3 |
69 | - extends Another_Class_With_A_Really_Long_Name |
|
69 | + extends Another_Class_With_A_Really_Long_Name |
|
70 | 70 | { |
71 | 71 | |
72 | 72 | } |
73 | 73 | |
74 | 74 | // Nor is this. |
75 | 75 | class A_Class_With_Really_Long_Name_4 |
76 | - extends Another_Class_With_A_Really_Long_Name |
|
77 | - implements Some_Interface_With_A_Long_Name, |
|
78 | - Another_Interface_With_A_Long_Name |
|
76 | + extends Another_Class_With_A_Really_Long_Name |
|
77 | + implements Some_Interface_With_A_Long_Name, |
|
78 | + Another_Interface_With_A_Long_Name |
|
79 | 79 | { |
80 | 80 | |
81 | 81 | } |
@@ -86,6 +86,6 @@ discard block |
||
86 | 86 | |
87 | 87 | // And this is not. |
88 | 88 | class Test_Class_Bad_G |
89 | - /*some comment*/ |
|
89 | + /*some comment*/ |
|
90 | 90 | { |
91 | 91 | } |
@@ -15,63 +15,63 @@ |
||
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 []; |
|
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 | 29 | |
30 | - }//end getErrorList() |
|
30 | + }//end getErrorList() |
|
31 | 31 | |
32 | 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 | - * @param string $testFile The name of the file being tested. |
|
40 | - * |
|
41 | - * @return array<int, int> |
|
42 | - */ |
|
43 | - public function getWarningList($testFile='') |
|
44 | - { |
|
45 | - switch ($testFile) { |
|
46 | - case 'DuplicateClassNameUnitTest.1.inc': |
|
47 | - return [ |
|
48 | - 8 => 1, |
|
49 | - 9 => 1, |
|
50 | - 10 => 1, |
|
51 | - ]; |
|
52 | - break; |
|
53 | - case 'DuplicateClassNameUnitTest.2.inc': |
|
54 | - return [ |
|
55 | - 2 => 1, |
|
56 | - 3 => 1, |
|
57 | - 4 => 1, |
|
58 | - ]; |
|
59 | - break; |
|
60 | - case 'DuplicateClassNameUnitTest.5.inc': |
|
61 | - return [ |
|
62 | - 3 => 1, |
|
63 | - 7 => 1, |
|
64 | - ]; |
|
65 | - break; |
|
66 | - case 'DuplicateClassNameUnitTest.6.inc': |
|
67 | - return [10 => 1]; |
|
68 | - break; |
|
69 | - default: |
|
70 | - return []; |
|
71 | - break; |
|
72 | - }//end switch |
|
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 | + * @param string $testFile The name of the file being tested. |
|
40 | + * |
|
41 | + * @return array<int, int> |
|
42 | + */ |
|
43 | + public function getWarningList($testFile='') |
|
44 | + { |
|
45 | + switch ($testFile) { |
|
46 | + case 'DuplicateClassNameUnitTest.1.inc': |
|
47 | + return [ |
|
48 | + 8 => 1, |
|
49 | + 9 => 1, |
|
50 | + 10 => 1, |
|
51 | + ]; |
|
52 | + break; |
|
53 | + case 'DuplicateClassNameUnitTest.2.inc': |
|
54 | + return [ |
|
55 | + 2 => 1, |
|
56 | + 3 => 1, |
|
57 | + 4 => 1, |
|
58 | + ]; |
|
59 | + break; |
|
60 | + case 'DuplicateClassNameUnitTest.5.inc': |
|
61 | + return [ |
|
62 | + 3 => 1, |
|
63 | + 7 => 1, |
|
64 | + ]; |
|
65 | + break; |
|
66 | + case 'DuplicateClassNameUnitTest.6.inc': |
|
67 | + return [10 => 1]; |
|
68 | + break; |
|
69 | + default: |
|
70 | + return []; |
|
71 | + break; |
|
72 | + }//end switch |
|
73 | 73 | |
74 | - }//end getWarningList() |
|
74 | + }//end getWarningList() |
|
75 | 75 | |
76 | 76 | |
77 | 77 | }//end class |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | namespace A\B { |
3 | - class MyClass {} |
|
4 | - interface MyInterface {} |
|
3 | + class MyClass {} |
|
4 | + interface MyInterface {} |
|
5 | 5 | } |
6 | 6 | |
7 | 7 | namespace D { |
8 | - class MyClass {} |
|
8 | + class MyClass {} |
|
9 | 9 | } |
10 | 10 | ?> |
11 | 11 | \ No newline at end of file |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | class Test{ |
3 | - public function testOne(){ |
|
4 | - ?> |
|
3 | + public function testOne(){ |
|
4 | + ?> |
|
5 | 5 | <p>some html here</p> |
6 | 6 | <?php |
7 | 7 | } |
@@ -15,43 +15,43 @@ |
||
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 | - |
|
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 | - 3 => 1, |
|
45 | - 7 => 1, |
|
46 | - 78 => 1, |
|
47 | - 94 => 1, |
|
48 | - 100 => 1, |
|
49 | - 106 => 1, |
|
50 | - 117 => 1, |
|
51 | - 121 => 2, |
|
52 | - ]; |
|
53 | - |
|
54 | - }//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 | + |
|
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 | + 3 => 1, |
|
45 | + 7 => 1, |
|
46 | + 78 => 1, |
|
47 | + 94 => 1, |
|
48 | + 100 => 1, |
|
49 | + 106 => 1, |
|
50 | + 117 => 1, |
|
51 | + 121 => 2, |
|
52 | + ]; |
|
53 | + |
|
54 | + }//end getWarningList() |
|
55 | 55 | |
56 | 56 | |
57 | 57 | }//end class |
@@ -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 | - |
|
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 | - 4 => 1, |
|
45 | - 13 => 1, |
|
46 | - ]; |
|
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 | + |
|
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 | + 4 => 1, |
|
45 | + 13 => 1, |
|
46 | + ]; |
|
47 | + |
|
48 | + }//end getWarningList() |
|
49 | 49 | |
50 | 50 | |
51 | 51 | }//end class |
@@ -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 | - |
|
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 | - 4 => 1, |
|
45 | - 16 => 1, |
|
46 | - ]; |
|
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 | + |
|
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 | + 4 => 1, |
|
45 | + 16 => 1, |
|
46 | + ]; |
|
47 | + |
|
48 | + }//end getWarningList() |
|
49 | 49 | |
50 | 50 | |
51 | 51 | }//end class |