@@ -79,20 +79,20 @@ |
||
79 | 79 | 46 => 1, |
80 | 80 | 47 => 1, |
81 | 81 | 48 => 1, |
82 | - ); |
|
82 | + ); |
|
83 | 83 | break; |
84 | 84 | case 'DisallowTabIndentUnitTest.js': |
85 | 85 | return array( |
86 | 86 | 3 => 1, |
87 | 87 | 5 => 1, |
88 | 88 | 6 => 1, |
89 | - ); |
|
89 | + ); |
|
90 | 90 | break; |
91 | 91 | case 'DisallowTabIndentUnitTest.css': |
92 | 92 | return array( |
93 | 93 | 1 => 1, |
94 | 94 | 2 => 1, |
95 | - ); |
|
95 | + ); |
|
96 | 96 | break; |
97 | 97 | default: |
98 | 98 | return array(); |
@@ -43,30 +43,30 @@ |
||
43 | 43 | public function getWarningList($testFile='') |
44 | 44 | { |
45 | 45 | switch ($testFile) { |
46 | - case 'DuplicateClassNameUnitTest.1.inc': |
|
47 | - return array( |
|
48 | - 6 => 1, |
|
49 | - 7 => 1, |
|
50 | - ); |
|
51 | - break; |
|
52 | - case 'DuplicateClassNameUnitTest.2.inc': |
|
53 | - return array( |
|
54 | - 2 => 1, |
|
55 | - 3 => 1, |
|
56 | - ); |
|
57 | - break; |
|
58 | - case 'DuplicateClassNameUnitTest.5.inc': |
|
59 | - return array( |
|
60 | - 3 => 1, |
|
61 | - 7 => 1, |
|
62 | - ); |
|
63 | - break; |
|
64 | - case 'DuplicateClassNameUnitTest.6.inc': |
|
65 | - return array(10 => 1); |
|
66 | - break; |
|
67 | - default: |
|
68 | - return array(); |
|
69 | - break; |
|
46 | + case 'DuplicateClassNameUnitTest.1.inc': |
|
47 | + return array( |
|
48 | + 6 => 1, |
|
49 | + 7 => 1, |
|
50 | + ); |
|
51 | + break; |
|
52 | + case 'DuplicateClassNameUnitTest.2.inc': |
|
53 | + return array( |
|
54 | + 2 => 1, |
|
55 | + 3 => 1, |
|
56 | + ); |
|
57 | + break; |
|
58 | + case 'DuplicateClassNameUnitTest.5.inc': |
|
59 | + return array( |
|
60 | + 3 => 1, |
|
61 | + 7 => 1, |
|
62 | + ); |
|
63 | + break; |
|
64 | + case 'DuplicateClassNameUnitTest.6.inc': |
|
65 | + return array(10 => 1); |
|
66 | + break; |
|
67 | + default: |
|
68 | + return array(); |
|
69 | + break; |
|
70 | 70 | }//end switch |
71 | 71 | |
72 | 72 | }//end getWarningList() |
@@ -55,7 +55,7 @@ |
||
55 | 55 | * |
56 | 56 | * @return array<int, int> |
57 | 57 | */ |
58 | - public function getWarningList($testFile='') |
|
58 | + public function getWarningList($testFile = '') |
|
59 | 59 | { |
60 | 60 | switch ($testFile) { |
61 | 61 | case 'DuplicateClassNameUnitTest.1.inc': |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | class Test{ |
3 | 3 | public function testOne(){ |
4 | - ?> |
|
4 | + ?> |
|
5 | 5 | <p>some html here</p> |
6 | 6 | <?php |
7 | - } |
|
7 | + } |
|
8 | 8 | } |
9 | 9 | |
10 | 10 | class Test{ |
@@ -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 | } |
@@ -57,7 +57,7 @@ |
||
57 | 57 | 48 => 1, |
58 | 58 | 70 => 1, |
59 | 59 | 71 => 1, |
60 | - ); |
|
60 | + ); |
|
61 | 61 | |
62 | 62 | }//end getErrorList() |
63 | 63 |
@@ -107,9 +107,9 @@ |
||
107 | 107 | if ($foundIndent !== $expectedIndent) { |
108 | 108 | $error = 'Multi-line assignment not indented correctly; expected %s spaces but found %s'; |
109 | 109 | $data = array( |
110 | - $expectedIndent, |
|
111 | - $foundIndent, |
|
112 | - ); |
|
110 | + $expectedIndent, |
|
111 | + $foundIndent, |
|
112 | + ); |
|
113 | 113 | $phpcsFile->addError($error, $stackPtr, 'Indent', $data); |
114 | 114 | } |
115 | 115 |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | /** |
31 | 31 | * Returns an array of tokens this test wants to listen for. |
32 | 32 | * |
33 | - * @return array |
|
33 | + * @return string[] |
|
34 | 34 | */ |
35 | 35 | public function register() |
36 | 36 | { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | /** |
43 | 43 | * Processes this test, when one of its tokens is encountered. |
44 | 44 | * |
45 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
45 | + * @param File $phpcsFile The file being scanned. |
|
46 | 46 | * @param int $stackPtr The position of the current token |
47 | 47 | * in the stack passed in $tokens. |
48 | 48 | * |
@@ -24,11 +24,11 @@ discard block |
||
24 | 24 | public $indent = 4; |
25 | 25 | |
26 | 26 | |
27 | - /** |
|
28 | - * Returns an array of tokens this test wants to listen for. |
|
29 | - * |
|
30 | - * @return int[] |
|
31 | - */ |
|
27 | + /** |
|
28 | + * Returns an array of tokens this test wants to listen for. |
|
29 | + * |
|
30 | + * @return int[] |
|
31 | + */ |
|
32 | 32 | public function register() |
33 | 33 | { |
34 | 34 | return Tokens::$scopeOpeners; |
@@ -95,9 +95,9 @@ discard block |
||
95 | 95 | // Check that the closing brace is on it's own line. |
96 | 96 | $lastContent = $phpcsFile->findPrevious( |
97 | 97 | array( |
98 | - T_WHITESPACE, |
|
99 | - T_INLINE_HTML, |
|
100 | - T_OPEN_TAG, |
|
98 | + T_WHITESPACE, |
|
99 | + T_INLINE_HTML, |
|
100 | + T_OPEN_TAG, |
|
101 | 101 | ), |
102 | 102 | ($scopeEnd - 1), |
103 | 103 | $scopeStart, |
@@ -146,9 +146,9 @@ discard block |
||
146 | 146 | if ($braceIndent !== $expectedIndent) { |
147 | 147 | $error = 'Case breaking statement indented incorrectly; expected %s spaces, found %s'; |
148 | 148 | $data = array( |
149 | - $expectedIndent, |
|
150 | - $braceIndent, |
|
151 | - ); |
|
149 | + $expectedIndent, |
|
150 | + $braceIndent, |
|
151 | + ); |
|
152 | 152 | $fix = $phpcsFile->addFixableError($error, $scopeEnd, 'BreakIndent', $data); |
153 | 153 | } |
154 | 154 | } else { |
@@ -156,9 +156,9 @@ discard block |
||
156 | 156 | if ($braceIndent !== $expectedIndent) { |
157 | 157 | $error = 'Closing brace indented incorrectly; expected %s spaces, found %s'; |
158 | 158 | $data = array( |
159 | - $expectedIndent, |
|
160 | - $braceIndent, |
|
161 | - ); |
|
159 | + $expectedIndent, |
|
160 | + $braceIndent, |
|
161 | + ); |
|
162 | 162 | $fix = $phpcsFile->addFixableError($error, $scopeEnd, 'Indent', $data); |
163 | 163 | } |
164 | 164 | }//end if |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | $expectedIndent, |
164 | 164 | $braceIndent, |
165 | 165 | ); |
166 | - $fix = $phpcsFile->addFixableError($error, $scopeEnd, 'BreakIndent', $data); |
|
166 | + $fix = $phpcsFile->addFixableError($error, $scopeEnd, 'BreakIndent', $data); |
|
167 | 167 | } |
168 | 168 | } else { |
169 | 169 | $expectedIndent = ($startColumn - 1); |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | $expectedIndent, |
174 | 174 | $braceIndent, |
175 | 175 | ); |
176 | - $fix = $phpcsFile->addFixableError($error, $scopeEnd, 'Indent', $data); |
|
176 | + $fix = $phpcsFile->addFixableError($error, $scopeEnd, 'Indent', $data); |
|
177 | 177 | } |
178 | 178 | }//end if |
179 | 179 |
@@ -144,9 +144,9 @@ |
||
144 | 144 | if ($foundIndent !== $requiredIndent) { |
145 | 145 | $error = 'Object operator not indented correctly; expected %s spaces but found %s'; |
146 | 146 | $data = array( |
147 | - $requiredIndent, |
|
148 | - $foundIndent, |
|
149 | - ); |
|
147 | + $requiredIndent, |
|
148 | + $foundIndent, |
|
149 | + ); |
|
150 | 150 | |
151 | 151 | $fix = $phpcsFile->addFixableError($error, $next, 'Incorrect', $data); |
152 | 152 | if ($fix === true) { |
@@ -57,7 +57,7 @@ |
||
57 | 57 | 48 => 1, |
58 | 58 | 70 => 1, |
59 | 59 | 71 => 1, |
60 | - ); |
|
60 | + ); |
|
61 | 61 | |
62 | 62 | }//end getErrorList() |
63 | 63 |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | /** |
27 | 27 | * Returns an array of tokens this test wants to listen for. |
28 | 28 | * |
29 | - * @return array |
|
29 | + * @return integer[] |
|
30 | 30 | */ |
31 | 31 | public function register() |
32 | 32 | { |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | /** |
39 | 39 | * Processes this sniff when one of its tokens is encountered. |
40 | 40 | * |
41 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
41 | + * @param File $phpcsFile The file being scanned. |
|
42 | 42 | * @param int $stackPtr The position of the current token |
43 | 43 | * in the stack passed in $tokens. |
44 | 44 | * |
@@ -34,9 +34,9 @@ discard block |
||
34 | 34 | * @var array |
35 | 35 | */ |
36 | 36 | public $supportedTokenizers = array( |
37 | - 'PHP', |
|
38 | - 'JS', |
|
39 | - ); |
|
37 | + 'PHP', |
|
38 | + 'JS', |
|
39 | + ); |
|
40 | 40 | |
41 | 41 | /** |
42 | 42 | * The number of spaces code should be indented. |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | return array( |
57 | 57 | T_IF, |
58 | 58 | T_ELSEIF, |
59 | - ); |
|
59 | + ); |
|
60 | 60 | |
61 | 61 | }//end register() |
62 | 62 | |
@@ -166,9 +166,9 @@ discard block |
||
166 | 166 | if ($expectedIndent !== $foundIndent) { |
167 | 167 | $error = 'Multi-line IF statement not indented correctly; expected %s spaces but found %s'; |
168 | 168 | $data = array( |
169 | - $expectedIndent, |
|
170 | - $foundIndent, |
|
171 | - ); |
|
169 | + $expectedIndent, |
|
170 | + $foundIndent, |
|
171 | + ); |
|
172 | 172 | |
173 | 173 | $fix = $phpcsFile->addFixableError($error, $i, 'Alignment', $data); |
174 | 174 | if ($fix === true) { |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | /** |
27 | 27 | * Returns an array of tokens this test wants to listen for. |
28 | 28 | * |
29 | - * @return array |
|
29 | + * @return integer[] |
|
30 | 30 | */ |
31 | 31 | public function register() |
32 | 32 | { |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | /** |
39 | 39 | * Processes this sniff when one of its tokens is encountered. |
40 | 40 | * |
41 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
41 | + * @param File $phpcsFile The file being scanned. |
|
42 | 42 | * @param int $stackPtr The position of the current token |
43 | 43 | * in the stack passed in $tokens. |
44 | 44 | * |
@@ -57,7 +57,7 @@ |
||
57 | 57 | 48 => 1, |
58 | 58 | 70 => 1, |
59 | 59 | 71 => 1, |
60 | - ); |
|
60 | + ); |
|
61 | 61 | |
62 | 62 | }//end getErrorList() |
63 | 63 |