@@ -61,10 +61,10 @@ discard block |
||
61 | 61 | use Something\True; |
62 | 62 | class MyClass |
63 | 63 | { |
64 | - public function myFunction() |
|
65 | - { |
|
66 | - $var = array('foo' => new True()); |
|
67 | - } |
|
64 | + public function myFunction() |
|
65 | + { |
|
66 | + $var = array('foo' => new True()); |
|
67 | + } |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | $x = $f?FALSE:true; |
@@ -72,8 +72,8 @@ discard block |
||
72 | 72 | |
73 | 73 | class MyClass |
74 | 74 | { |
75 | - // Spice things up a little. |
|
76 | - const TRUE = false; |
|
75 | + // Spice things up a little. |
|
76 | + const TRUE = false; |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | var_dump(MyClass::TRUE); |
@@ -1,51 +1,51 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | // True |
4 | -function myFunction($arg1, $arg2=true) |
|
4 | +function myFunction( $arg1, $arg2 = true ) |
|
5 | 5 | { |
6 | 6 | } |
7 | -function myFunction($arg1, $arg2=TRUE) |
|
7 | +function myFunction( $arg1, $arg2 = TRUE ) |
|
8 | 8 | { |
9 | 9 | } |
10 | -function myFunction($arg1, $arg2=True) |
|
10 | +function myFunction( $arg1, $arg2 = True ) |
|
11 | 11 | { |
12 | 12 | } |
13 | 13 | |
14 | -if ($variable === true) { } |
|
15 | -if ($variable === TRUE) { } |
|
16 | -if ($variable === True) { } |
|
14 | +if ( $variable === true ) { } |
|
15 | +if ( $variable === TRUE ) { } |
|
16 | +if ( $variable === True ) { } |
|
17 | 17 | |
18 | 18 | |
19 | 19 | // False |
20 | -function myFunction($arg1, $arg2=false) |
|
20 | +function myFunction( $arg1, $arg2 = false ) |
|
21 | 21 | { |
22 | 22 | } |
23 | -function myFunction($arg1, $arg2=FALSE) |
|
23 | +function myFunction( $arg1, $arg2 = FALSE ) |
|
24 | 24 | { |
25 | 25 | } |
26 | -function myFunction($arg1, $arg2=False) |
|
26 | +function myFunction( $arg1, $arg2 = False ) |
|
27 | 27 | { |
28 | 28 | } |
29 | 29 | |
30 | -if ($variable === false) { } |
|
31 | -if ($variable === FALSE) { } |
|
32 | -if ($variable === False) { } |
|
30 | +if ( $variable === false ) { } |
|
31 | +if ( $variable === FALSE ) { } |
|
32 | +if ( $variable === False ) { } |
|
33 | 33 | |
34 | 34 | |
35 | 35 | // Null |
36 | -function myFunction($arg1, $arg2=null) |
|
36 | +function myFunction( $arg1, $arg2 = null ) |
|
37 | 37 | { |
38 | 38 | } |
39 | -function myFunction($arg1, $arg2=NULL) |
|
39 | +function myFunction( $arg1, $arg2 = NULL ) |
|
40 | 40 | { |
41 | 41 | } |
42 | -function myFunction($arg1, $arg2=Null) |
|
42 | +function myFunction( $arg1, $arg2 = Null ) |
|
43 | 43 | { |
44 | 44 | } |
45 | 45 | |
46 | -if ($variable === null) { } |
|
47 | -if ($variable === NULL) { } |
|
48 | -if ($variable === Null) { } |
|
46 | +if ( $variable === null ) { } |
|
47 | +if ( $variable === NULL ) { } |
|
48 | +if ( $variable === Null ) { } |
|
49 | 49 | |
50 | 50 | $x = new stdClass(); |
51 | 51 | $x->NULL = 7; |
@@ -63,12 +63,12 @@ discard block |
||
63 | 63 | { |
64 | 64 | public function myFunction() |
65 | 65 | { |
66 | - $var = array('foo' => new True()); |
|
66 | + $var = array( 'foo' => new True() ); |
|
67 | 67 | } |
68 | 68 | } |
69 | 69 | |
70 | -$x = $f?FALSE:true; |
|
71 | -$x = $f? FALSE:true; |
|
70 | +$x = $f ?FALSE:true; |
|
71 | +$x = $f ? FALSE:true; |
|
72 | 72 | |
73 | 73 | class MyClass |
74 | 74 | { |
@@ -76,8 +76,8 @@ discard block |
||
76 | 76 | const TRUE = false; |
77 | 77 | } |
78 | 78 | |
79 | -var_dump(MyClass::TRUE); |
|
79 | +var_dump( MyClass::TRUE ); |
|
80 | 80 | |
81 | 81 | function tRUE() {} |
82 | 82 | |
83 | -$input->getFilterChain()->attachByName('Null', ['type' => Null::TYPE_STRING]); |
|
83 | +$input->getFilterChain()->attachByName( 'Null', [ 'type' => Null::TYPE_STRING ] ); |
@@ -1,14 +1,11 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | // True |
4 | -function myFunction($arg1, $arg2=true) |
|
5 | -{ |
|
4 | +function myFunction($arg1, $arg2=true) { |
|
6 | 5 | } |
7 | -function myFunction($arg1, $arg2=TRUE) |
|
8 | -{ |
|
6 | +function myFunction($arg1, $arg2=TRUE) { |
|
9 | 7 | } |
10 | -function myFunction($arg1, $arg2=True) |
|
11 | -{ |
|
8 | +function myFunction($arg1, $arg2=True) { |
|
12 | 9 | } |
13 | 10 | |
14 | 11 | if ($variable === true) { } |
@@ -17,14 +14,11 @@ discard block |
||
17 | 14 | |
18 | 15 | |
19 | 16 | // False |
20 | -function myFunction($arg1, $arg2=false) |
|
21 | -{ |
|
17 | +function myFunction($arg1, $arg2=false) { |
|
22 | 18 | } |
23 | -function myFunction($arg1, $arg2=FALSE) |
|
24 | -{ |
|
19 | +function myFunction($arg1, $arg2=FALSE) { |
|
25 | 20 | } |
26 | -function myFunction($arg1, $arg2=False) |
|
27 | -{ |
|
21 | +function myFunction($arg1, $arg2=False) { |
|
28 | 22 | } |
29 | 23 | |
30 | 24 | if ($variable === false) { } |
@@ -33,14 +27,11 @@ discard block |
||
33 | 27 | |
34 | 28 | |
35 | 29 | // Null |
36 | -function myFunction($arg1, $arg2=null) |
|
37 | -{ |
|
30 | +function myFunction($arg1, $arg2=null) { |
|
38 | 31 | } |
39 | -function myFunction($arg1, $arg2=NULL) |
|
40 | -{ |
|
32 | +function myFunction($arg1, $arg2=NULL) { |
|
41 | 33 | } |
42 | -function myFunction($arg1, $arg2=Null) |
|
43 | -{ |
|
34 | +function myFunction($arg1, $arg2=Null) { |
|
44 | 35 | } |
45 | 36 | |
46 | 37 | if ($variable === null) { } |
@@ -59,10 +50,8 @@ discard block |
||
59 | 50 | |
60 | 51 | use True\Something; |
61 | 52 | use Something\True; |
62 | -class MyClass |
|
63 | -{ |
|
64 | - public function myFunction() |
|
65 | - { |
|
53 | +class MyClass { |
|
54 | + public function myFunction() { |
|
66 | 55 | $var = array('foo' => new True()); |
67 | 56 | } |
68 | 57 | } |
@@ -70,8 +59,7 @@ discard block |
||
70 | 59 | $x = $f?FALSE:true; |
71 | 60 | $x = $f? FALSE:true; |
72 | 61 | |
73 | -class MyClass |
|
74 | -{ |
|
62 | +class MyClass { |
|
75 | 63 | // Spice things up a little. |
76 | 64 | const TRUE = false; |
77 | 65 | } |
@@ -15,146 +15,146 @@ |
||
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='GitMergeConflictUnitTest.1.inc') |
|
29 | - { |
|
30 | - switch ($testFile) { |
|
31 | - case 'GitMergeConflictUnitTest.1.inc': |
|
32 | - return [ |
|
33 | - 26 => 1, |
|
34 | - 28 => 1, |
|
35 | - 30 => 1, |
|
36 | - 45 => 1, |
|
37 | - 53 => 1, |
|
38 | - 55 => 1, |
|
39 | - 59 => 1, |
|
40 | - 61 => 1, |
|
41 | - ]; |
|
42 | - |
|
43 | - case 'GitMergeConflictUnitTest.2.inc': |
|
44 | - return [ |
|
45 | - 4 => 1, |
|
46 | - 6 => 1, |
|
47 | - 8 => 1, |
|
48 | - 14 => 1, |
|
49 | - 20 => 1, |
|
50 | - 22 => 1, |
|
51 | - 26 => 1, |
|
52 | - 28 => 1, |
|
53 | - 30 => 1, |
|
54 | - ]; |
|
55 | - |
|
56 | - case 'GitMergeConflictUnitTest.3.inc': |
|
57 | - return [ |
|
58 | - 3 => 1, |
|
59 | - 5 => 1, |
|
60 | - 7 => 1, |
|
61 | - 12 => 1, |
|
62 | - 14 => 1, |
|
63 | - 16 => 1, |
|
64 | - 22 => 1, |
|
65 | - 24 => 1, |
|
66 | - 26 => 1, |
|
67 | - 38 => 1, |
|
68 | - 40 => 1, |
|
69 | - 42 => 1, |
|
70 | - ]; |
|
71 | - |
|
72 | - case 'GitMergeConflictUnitTest.4.inc': |
|
73 | - return [ |
|
74 | - 6 => 1, |
|
75 | - 8 => 1, |
|
76 | - 10 => 1, |
|
77 | - 18 => 1, |
|
78 | - 22 => 1, |
|
79 | - 25 => 1, |
|
80 | - 29 => 1, |
|
81 | - 34 => 1, |
|
82 | - 39 => 1, |
|
83 | - 53 => 1, |
|
84 | - 55 => 1, |
|
85 | - 57 => 1, |
|
86 | - 64 => 1, |
|
87 | - 68 => 1, |
|
88 | - 71 => 1, |
|
89 | - ]; |
|
90 | - case 'GitMergeConflictUnitTest.5.inc': |
|
91 | - case 'GitMergeConflictUnitTest.6.inc': |
|
92 | - return [ |
|
93 | - 6 => 1, |
|
94 | - 8 => 1, |
|
95 | - 10 => 1, |
|
96 | - 15 => 1, |
|
97 | - 28 => 1, |
|
98 | - 30 => 1, |
|
99 | - 32 => 1, |
|
100 | - ]; |
|
101 | - |
|
102 | - case 'GitMergeConflictUnitTest.1.css': |
|
103 | - return [ |
|
104 | - 3 => 1, |
|
105 | - 5 => 1, |
|
106 | - 7 => 1, |
|
107 | - 12 => 1, |
|
108 | - 14 => 1, |
|
109 | - 16 => 1, |
|
110 | - 30 => 1, |
|
111 | - 32 => 1, |
|
112 | - 34 => 1, |
|
113 | - ]; |
|
114 | - |
|
115 | - case 'GitMergeConflictUnitTest.2.css': |
|
116 | - return [ |
|
117 | - 3 => 1, |
|
118 | - 8 => 1, |
|
119 | - 13 => 1, |
|
120 | - 27 => 1, |
|
121 | - 29 => 1, |
|
122 | - 31 => 1, |
|
123 | - ]; |
|
124 | - |
|
125 | - case 'GitMergeConflictUnitTest.js': |
|
126 | - return [ |
|
127 | - 5 => 1, |
|
128 | - 7 => 1, |
|
129 | - 9 => 1, |
|
130 | - 12 => 1, |
|
131 | - 14 => 1, |
|
132 | - 16 => 1, |
|
133 | - 24 => 1, |
|
134 | - 30 => 1, |
|
135 | - 32 => 1, |
|
136 | - ]; |
|
137 | - |
|
138 | - default: |
|
139 | - return []; |
|
140 | - }//end switch |
|
141 | - |
|
142 | - }//end getErrorList() |
|
143 | - |
|
144 | - |
|
145 | - /** |
|
146 | - * Returns the lines where warnings should occur. |
|
147 | - * |
|
148 | - * The key of the array should represent the line number and the value |
|
149 | - * should represent the number of warnings that should occur on that line. |
|
150 | - * |
|
151 | - * @return array<int, int> |
|
152 | - */ |
|
153 | - public function getWarningList() |
|
154 | - { |
|
155 | - return []; |
|
156 | - |
|
157 | - }//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='GitMergeConflictUnitTest.1.inc') |
|
29 | + { |
|
30 | + switch ($testFile) { |
|
31 | + case 'GitMergeConflictUnitTest.1.inc': |
|
32 | + return [ |
|
33 | + 26 => 1, |
|
34 | + 28 => 1, |
|
35 | + 30 => 1, |
|
36 | + 45 => 1, |
|
37 | + 53 => 1, |
|
38 | + 55 => 1, |
|
39 | + 59 => 1, |
|
40 | + 61 => 1, |
|
41 | + ]; |
|
42 | + |
|
43 | + case 'GitMergeConflictUnitTest.2.inc': |
|
44 | + return [ |
|
45 | + 4 => 1, |
|
46 | + 6 => 1, |
|
47 | + 8 => 1, |
|
48 | + 14 => 1, |
|
49 | + 20 => 1, |
|
50 | + 22 => 1, |
|
51 | + 26 => 1, |
|
52 | + 28 => 1, |
|
53 | + 30 => 1, |
|
54 | + ]; |
|
55 | + |
|
56 | + case 'GitMergeConflictUnitTest.3.inc': |
|
57 | + return [ |
|
58 | + 3 => 1, |
|
59 | + 5 => 1, |
|
60 | + 7 => 1, |
|
61 | + 12 => 1, |
|
62 | + 14 => 1, |
|
63 | + 16 => 1, |
|
64 | + 22 => 1, |
|
65 | + 24 => 1, |
|
66 | + 26 => 1, |
|
67 | + 38 => 1, |
|
68 | + 40 => 1, |
|
69 | + 42 => 1, |
|
70 | + ]; |
|
71 | + |
|
72 | + case 'GitMergeConflictUnitTest.4.inc': |
|
73 | + return [ |
|
74 | + 6 => 1, |
|
75 | + 8 => 1, |
|
76 | + 10 => 1, |
|
77 | + 18 => 1, |
|
78 | + 22 => 1, |
|
79 | + 25 => 1, |
|
80 | + 29 => 1, |
|
81 | + 34 => 1, |
|
82 | + 39 => 1, |
|
83 | + 53 => 1, |
|
84 | + 55 => 1, |
|
85 | + 57 => 1, |
|
86 | + 64 => 1, |
|
87 | + 68 => 1, |
|
88 | + 71 => 1, |
|
89 | + ]; |
|
90 | + case 'GitMergeConflictUnitTest.5.inc': |
|
91 | + case 'GitMergeConflictUnitTest.6.inc': |
|
92 | + return [ |
|
93 | + 6 => 1, |
|
94 | + 8 => 1, |
|
95 | + 10 => 1, |
|
96 | + 15 => 1, |
|
97 | + 28 => 1, |
|
98 | + 30 => 1, |
|
99 | + 32 => 1, |
|
100 | + ]; |
|
101 | + |
|
102 | + case 'GitMergeConflictUnitTest.1.css': |
|
103 | + return [ |
|
104 | + 3 => 1, |
|
105 | + 5 => 1, |
|
106 | + 7 => 1, |
|
107 | + 12 => 1, |
|
108 | + 14 => 1, |
|
109 | + 16 => 1, |
|
110 | + 30 => 1, |
|
111 | + 32 => 1, |
|
112 | + 34 => 1, |
|
113 | + ]; |
|
114 | + |
|
115 | + case 'GitMergeConflictUnitTest.2.css': |
|
116 | + return [ |
|
117 | + 3 => 1, |
|
118 | + 8 => 1, |
|
119 | + 13 => 1, |
|
120 | + 27 => 1, |
|
121 | + 29 => 1, |
|
122 | + 31 => 1, |
|
123 | + ]; |
|
124 | + |
|
125 | + case 'GitMergeConflictUnitTest.js': |
|
126 | + return [ |
|
127 | + 5 => 1, |
|
128 | + 7 => 1, |
|
129 | + 9 => 1, |
|
130 | + 12 => 1, |
|
131 | + 14 => 1, |
|
132 | + 16 => 1, |
|
133 | + 24 => 1, |
|
134 | + 30 => 1, |
|
135 | + 32 => 1, |
|
136 | + ]; |
|
137 | + |
|
138 | + default: |
|
139 | + return []; |
|
140 | + }//end switch |
|
141 | + |
|
142 | + }//end getErrorList() |
|
143 | + |
|
144 | + |
|
145 | + /** |
|
146 | + * Returns the lines where warnings should occur. |
|
147 | + * |
|
148 | + * The key of the array should represent the line number and the value |
|
149 | + * should represent the number of warnings that should occur on that line. |
|
150 | + * |
|
151 | + * @return array<int, int> |
|
152 | + */ |
|
153 | + public function getWarningList() |
|
154 | + { |
|
155 | + return []; |
|
156 | + |
|
157 | + }//end getWarningList() |
|
158 | 158 | |
159 | 159 | |
160 | 160 | }//end class |
@@ -28,115 +28,115 @@ |
||
28 | 28 | public function getErrorList($testFile='GitMergeConflictUnitTest.1.inc') |
29 | 29 | { |
30 | 30 | switch ($testFile) { |
31 | - case 'GitMergeConflictUnitTest.1.inc': |
|
32 | - return [ |
|
33 | - 26 => 1, |
|
34 | - 28 => 1, |
|
35 | - 30 => 1, |
|
36 | - 45 => 1, |
|
37 | - 53 => 1, |
|
38 | - 55 => 1, |
|
39 | - 59 => 1, |
|
40 | - 61 => 1, |
|
41 | - ]; |
|
42 | - |
|
43 | - case 'GitMergeConflictUnitTest.2.inc': |
|
44 | - return [ |
|
45 | - 4 => 1, |
|
46 | - 6 => 1, |
|
47 | - 8 => 1, |
|
48 | - 14 => 1, |
|
49 | - 20 => 1, |
|
50 | - 22 => 1, |
|
51 | - 26 => 1, |
|
52 | - 28 => 1, |
|
53 | - 30 => 1, |
|
54 | - ]; |
|
55 | - |
|
56 | - case 'GitMergeConflictUnitTest.3.inc': |
|
57 | - return [ |
|
58 | - 3 => 1, |
|
59 | - 5 => 1, |
|
60 | - 7 => 1, |
|
61 | - 12 => 1, |
|
62 | - 14 => 1, |
|
63 | - 16 => 1, |
|
64 | - 22 => 1, |
|
65 | - 24 => 1, |
|
66 | - 26 => 1, |
|
67 | - 38 => 1, |
|
68 | - 40 => 1, |
|
69 | - 42 => 1, |
|
70 | - ]; |
|
71 | - |
|
72 | - case 'GitMergeConflictUnitTest.4.inc': |
|
73 | - return [ |
|
74 | - 6 => 1, |
|
75 | - 8 => 1, |
|
76 | - 10 => 1, |
|
77 | - 18 => 1, |
|
78 | - 22 => 1, |
|
79 | - 25 => 1, |
|
80 | - 29 => 1, |
|
81 | - 34 => 1, |
|
82 | - 39 => 1, |
|
83 | - 53 => 1, |
|
84 | - 55 => 1, |
|
85 | - 57 => 1, |
|
86 | - 64 => 1, |
|
87 | - 68 => 1, |
|
88 | - 71 => 1, |
|
89 | - ]; |
|
90 | - case 'GitMergeConflictUnitTest.5.inc': |
|
91 | - case 'GitMergeConflictUnitTest.6.inc': |
|
92 | - return [ |
|
93 | - 6 => 1, |
|
94 | - 8 => 1, |
|
95 | - 10 => 1, |
|
96 | - 15 => 1, |
|
97 | - 28 => 1, |
|
98 | - 30 => 1, |
|
99 | - 32 => 1, |
|
100 | - ]; |
|
101 | - |
|
102 | - case 'GitMergeConflictUnitTest.1.css': |
|
103 | - return [ |
|
104 | - 3 => 1, |
|
105 | - 5 => 1, |
|
106 | - 7 => 1, |
|
107 | - 12 => 1, |
|
108 | - 14 => 1, |
|
109 | - 16 => 1, |
|
110 | - 30 => 1, |
|
111 | - 32 => 1, |
|
112 | - 34 => 1, |
|
113 | - ]; |
|
114 | - |
|
115 | - case 'GitMergeConflictUnitTest.2.css': |
|
116 | - return [ |
|
117 | - 3 => 1, |
|
118 | - 8 => 1, |
|
119 | - 13 => 1, |
|
120 | - 27 => 1, |
|
121 | - 29 => 1, |
|
122 | - 31 => 1, |
|
123 | - ]; |
|
124 | - |
|
125 | - case 'GitMergeConflictUnitTest.js': |
|
126 | - return [ |
|
127 | - 5 => 1, |
|
128 | - 7 => 1, |
|
129 | - 9 => 1, |
|
130 | - 12 => 1, |
|
131 | - 14 => 1, |
|
132 | - 16 => 1, |
|
133 | - 24 => 1, |
|
134 | - 30 => 1, |
|
135 | - 32 => 1, |
|
136 | - ]; |
|
137 | - |
|
138 | - default: |
|
139 | - return []; |
|
31 | + case 'GitMergeConflictUnitTest.1.inc': |
|
32 | + return [ |
|
33 | + 26 => 1, |
|
34 | + 28 => 1, |
|
35 | + 30 => 1, |
|
36 | + 45 => 1, |
|
37 | + 53 => 1, |
|
38 | + 55 => 1, |
|
39 | + 59 => 1, |
|
40 | + 61 => 1, |
|
41 | + ]; |
|
42 | + |
|
43 | + case 'GitMergeConflictUnitTest.2.inc': |
|
44 | + return [ |
|
45 | + 4 => 1, |
|
46 | + 6 => 1, |
|
47 | + 8 => 1, |
|
48 | + 14 => 1, |
|
49 | + 20 => 1, |
|
50 | + 22 => 1, |
|
51 | + 26 => 1, |
|
52 | + 28 => 1, |
|
53 | + 30 => 1, |
|
54 | + ]; |
|
55 | + |
|
56 | + case 'GitMergeConflictUnitTest.3.inc': |
|
57 | + return [ |
|
58 | + 3 => 1, |
|
59 | + 5 => 1, |
|
60 | + 7 => 1, |
|
61 | + 12 => 1, |
|
62 | + 14 => 1, |
|
63 | + 16 => 1, |
|
64 | + 22 => 1, |
|
65 | + 24 => 1, |
|
66 | + 26 => 1, |
|
67 | + 38 => 1, |
|
68 | + 40 => 1, |
|
69 | + 42 => 1, |
|
70 | + ]; |
|
71 | + |
|
72 | + case 'GitMergeConflictUnitTest.4.inc': |
|
73 | + return [ |
|
74 | + 6 => 1, |
|
75 | + 8 => 1, |
|
76 | + 10 => 1, |
|
77 | + 18 => 1, |
|
78 | + 22 => 1, |
|
79 | + 25 => 1, |
|
80 | + 29 => 1, |
|
81 | + 34 => 1, |
|
82 | + 39 => 1, |
|
83 | + 53 => 1, |
|
84 | + 55 => 1, |
|
85 | + 57 => 1, |
|
86 | + 64 => 1, |
|
87 | + 68 => 1, |
|
88 | + 71 => 1, |
|
89 | + ]; |
|
90 | + case 'GitMergeConflictUnitTest.5.inc': |
|
91 | + case 'GitMergeConflictUnitTest.6.inc': |
|
92 | + return [ |
|
93 | + 6 => 1, |
|
94 | + 8 => 1, |
|
95 | + 10 => 1, |
|
96 | + 15 => 1, |
|
97 | + 28 => 1, |
|
98 | + 30 => 1, |
|
99 | + 32 => 1, |
|
100 | + ]; |
|
101 | + |
|
102 | + case 'GitMergeConflictUnitTest.1.css': |
|
103 | + return [ |
|
104 | + 3 => 1, |
|
105 | + 5 => 1, |
|
106 | + 7 => 1, |
|
107 | + 12 => 1, |
|
108 | + 14 => 1, |
|
109 | + 16 => 1, |
|
110 | + 30 => 1, |
|
111 | + 32 => 1, |
|
112 | + 34 => 1, |
|
113 | + ]; |
|
114 | + |
|
115 | + case 'GitMergeConflictUnitTest.2.css': |
|
116 | + return [ |
|
117 | + 3 => 1, |
|
118 | + 8 => 1, |
|
119 | + 13 => 1, |
|
120 | + 27 => 1, |
|
121 | + 29 => 1, |
|
122 | + 31 => 1, |
|
123 | + ]; |
|
124 | + |
|
125 | + case 'GitMergeConflictUnitTest.js': |
|
126 | + return [ |
|
127 | + 5 => 1, |
|
128 | + 7 => 1, |
|
129 | + 9 => 1, |
|
130 | + 12 => 1, |
|
131 | + 14 => 1, |
|
132 | + 16 => 1, |
|
133 | + 24 => 1, |
|
134 | + 30 => 1, |
|
135 | + 32 => 1, |
|
136 | + ]; |
|
137 | + |
|
138 | + default: |
|
139 | + return []; |
|
140 | 140 | }//end switch |
141 | 141 | |
142 | 142 | }//end getErrorList() |
@@ -25,9 +25,9 @@ discard block |
||
25 | 25 | * |
26 | 26 | * @return array<int, int> |
27 | 27 | */ |
28 | - public function getErrorList($testFile='GitMergeConflictUnitTest.1.inc') |
|
28 | + public function getErrorList( $testFile = 'GitMergeConflictUnitTest.1.inc' ) |
|
29 | 29 | { |
30 | - switch ($testFile) { |
|
30 | + switch ( $testFile ) { |
|
31 | 31 | case 'GitMergeConflictUnitTest.1.inc': |
32 | 32 | return [ |
33 | 33 | 26 => 1, |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | ]; |
137 | 137 | |
138 | 138 | default: |
139 | - return []; |
|
139 | + return [ ]; |
|
140 | 140 | }//end switch |
141 | 141 | |
142 | 142 | }//end getErrorList() |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | */ |
153 | 153 | public function getWarningList() |
154 | 154 | { |
155 | - return []; |
|
155 | + return [ ]; |
|
156 | 156 | |
157 | 157 | }//end getWarningList() |
158 | 158 |
@@ -11,8 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; |
13 | 13 | |
14 | -class GitMergeConflictUnitTest extends AbstractSniffUnitTest |
|
15 | -{ |
|
14 | +class GitMergeConflictUnitTest 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='GitMergeConflictUnitTest.1.inc') |
|
29 | - { |
|
27 | + public function getErrorList($testFile='GitMergeConflictUnitTest.1.inc') { |
|
30 | 28 | switch ($testFile) { |
31 | 29 | case 'GitMergeConflictUnitTest.1.inc': |
32 | 30 | return [ |
@@ -150,8 +148,7 @@ discard block |
||
150 | 148 | * |
151 | 149 | * @return array<int, int> |
152 | 150 | */ |
153 | - public function getWarningList() |
|
154 | - { |
|
151 | + public function getWarningList() { |
|
155 | 152 | return []; |
156 | 153 | |
157 | 154 | }//end getWarningList() |
@@ -15,47 +15,47 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Should this test be skipped for some reason. |
|
20 | - * |
|
21 | - * @return void |
|
22 | - */ |
|
23 | - protected function shouldSkipTest() |
|
24 | - { |
|
25 | - // This sniff cannot be tested as no SVN version control directory is available. |
|
26 | - return true; |
|
27 | - |
|
28 | - }//end shouldSkipTest() |
|
29 | - |
|
30 | - |
|
31 | - /** |
|
32 | - * Returns the lines where errors should occur. |
|
33 | - * |
|
34 | - * The key of the array should represent the line number and the value |
|
35 | - * should represent the number of errors that should occur on that line. |
|
36 | - * |
|
37 | - * @return array<int, int> |
|
38 | - */ |
|
39 | - public function getErrorList() |
|
40 | - { |
|
41 | - return []; |
|
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 []; |
|
57 | - |
|
58 | - }//end getWarningList() |
|
18 | + /** |
|
19 | + * Should this test be skipped for some reason. |
|
20 | + * |
|
21 | + * @return void |
|
22 | + */ |
|
23 | + protected function shouldSkipTest() |
|
24 | + { |
|
25 | + // This sniff cannot be tested as no SVN version control directory is available. |
|
26 | + return true; |
|
27 | + |
|
28 | + }//end shouldSkipTest() |
|
29 | + |
|
30 | + |
|
31 | + /** |
|
32 | + * Returns the lines where errors should occur. |
|
33 | + * |
|
34 | + * The key of the array should represent the line number and the value |
|
35 | + * should represent the number of errors that should occur on that line. |
|
36 | + * |
|
37 | + * @return array<int, int> |
|
38 | + */ |
|
39 | + public function getErrorList() |
|
40 | + { |
|
41 | + return []; |
|
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 []; |
|
57 | + |
|
58 | + }//end getWarningList() |
|
59 | 59 | |
60 | 60 | |
61 | 61 | }//end class |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | */ |
39 | 39 | public function getErrorList() |
40 | 40 | { |
41 | - return []; |
|
41 | + return [ ]; |
|
42 | 42 | |
43 | 43 | }//end getErrorList() |
44 | 44 | |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | */ |
54 | 54 | public function getWarningList() |
55 | 55 | { |
56 | - return []; |
|
56 | + return [ ]; |
|
57 | 57 | |
58 | 58 | }//end getWarningList() |
59 | 59 |
@@ -11,8 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; |
13 | 13 | |
14 | -class SubversionPropertiesUnitTest extends AbstractSniffUnitTest |
|
15 | -{ |
|
14 | +class SubversionPropertiesUnitTest extends AbstractSniffUnitTest { |
|
16 | 15 | |
17 | 16 | |
18 | 17 | /** |
@@ -20,8 +19,7 @@ discard block |
||
20 | 19 | * |
21 | 20 | * @return void |
22 | 21 | */ |
23 | - protected function shouldSkipTest() |
|
24 | - { |
|
22 | + protected function shouldSkipTest() { |
|
25 | 23 | // This sniff cannot be tested as no SVN version control directory is available. |
26 | 24 | return true; |
27 | 25 | |
@@ -36,8 +34,7 @@ discard block |
||
36 | 34 | * |
37 | 35 | * @return array<int, int> |
38 | 36 | */ |
39 | - public function getErrorList() |
|
40 | - { |
|
37 | + public function getErrorList() { |
|
41 | 38 | return []; |
42 | 39 | |
43 | 40 | }//end getErrorList() |
@@ -51,8 +48,7 @@ discard block |
||
51 | 48 | * |
52 | 49 | * @return array<int, int> |
53 | 50 | */ |
54 | - public function getWarningList() |
|
55 | - { |
|
51 | + public function getWarningList() { |
|
56 | 52 | return []; |
57 | 53 | |
58 | 54 | }//end getWarningList() |
@@ -19,7 +19,7 @@ |
||
19 | 19 | /** |
20 | 20 | * Should this test be skipped for some reason. |
21 | 21 | * |
22 | - * @return void |
|
22 | + * @return boolean |
|
23 | 23 | */ |
24 | 24 | protected function shouldSkipTest() |
25 | 25 | { |
@@ -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 |
@@ -53,7 +53,7 @@ |
||
53 | 53 | */ |
54 | 54 | public function getWarningList() |
55 | 55 | { |
56 | - return [51 => 1]; |
|
56 | + return [ 51 => 1 ]; |
|
57 | 57 | |
58 | 58 | }//end getWarningList() |
59 | 59 |
@@ -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() |
@@ -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 | } |
@@ -35,16 +35,16 @@ |
||
35 | 35 | } |
36 | 36 | |
37 | 37 | // These should all be flagged for wrong whitespace before opening brace. |
38 | -interface Test_Interface_Bad_C { |
|
38 | +interface Test_Interface_Bad_C { |
|
39 | 39 | } |
40 | 40 | |
41 | -class Test_Class_Bad_G { |
|
41 | +class Test_Class_Bad_G { |
|
42 | 42 | } |
43 | 43 | |
44 | -class Test_Class_Bad_H extends Test_Class_Bad_G { |
|
44 | +class Test_Class_Bad_H extends Test_Class_Bad_G { |
|
45 | 45 | } |
46 | 46 | |
47 | -class Test_Class_Bad_I implements Test_Interface_Bad_C{ |
|
47 | +class Test_Class_Bad_I implements Test_Interface_Bad_C { |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | // This one should be flagged as a potential parse error. |
@@ -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 |
@@ -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 |
@@ -43,32 +43,32 @@ |
||
43 | 43 | public function getWarningList($testFile='') |
44 | 44 | { |
45 | 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; |
|
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 | 72 | }//end switch |
73 | 73 | |
74 | 74 | }//end getWarningList() |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function getErrorList() |
27 | 27 | { |
28 | - return []; |
|
28 | + return [ ]; |
|
29 | 29 | |
30 | 30 | }//end getErrorList() |
31 | 31 | |
@@ -40,9 +40,9 @@ discard block |
||
40 | 40 | * |
41 | 41 | * @return array<int, int> |
42 | 42 | */ |
43 | - public function getWarningList($testFile='') |
|
43 | + public function getWarningList( $testFile = '' ) |
|
44 | 44 | { |
45 | - switch ($testFile) { |
|
45 | + switch ( $testFile ) { |
|
46 | 46 | case 'DuplicateClassNameUnitTest.1.inc': |
47 | 47 | return [ |
48 | 48 | 8 => 1, |
@@ -64,10 +64,10 @@ discard block |
||
64 | 64 | ]; |
65 | 65 | break; |
66 | 66 | case 'DuplicateClassNameUnitTest.6.inc': |
67 | - return [10 => 1]; |
|
67 | + return [ 10 => 1 ]; |
|
68 | 68 | break; |
69 | 69 | default: |
70 | - return []; |
|
70 | + return [ ]; |
|
71 | 71 | break; |
72 | 72 | }//end switch |
73 | 73 |
@@ -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,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 | } |
@@ -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 | } |
@@ -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 | } |
@@ -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 |
@@ -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, |
@@ -25,7 +25,7 @@ |
||
25 | 25 | */ |
26 | 26 | public function getErrorList() |
27 | 27 | { |
28 | - return []; |
|
28 | + return [ ]; |
|
29 | 29 | |
30 | 30 | }//end getErrorList() |
31 | 31 |