@@ -13,8 +13,7 @@ discard block |
||
13 | 13 | use PHP_CodeSniffer\Exceptions\TokenizerException; |
14 | 14 | use PHP_CodeSniffer\Config; |
15 | 15 | |
16 | -class JS extends Tokenizer |
|
17 | -{ |
|
16 | +class JS extends Tokenizer { |
|
18 | 17 | |
19 | 18 | |
20 | 19 | /** |
@@ -259,8 +258,7 @@ discard block |
||
259 | 258 | * @return void |
260 | 259 | * @throws \PHP_CodeSniffer\Exceptions\TokenizerException If the file appears to be minified. |
261 | 260 | */ |
262 | - public function __construct($content, Config $config, $eolChar='\n') |
|
263 | - { |
|
261 | + public function __construct($content, Config $config, $eolChar='\n') { |
|
264 | 262 | if ($this->isMinifiedContent($content, $eolChar) === true) { |
265 | 263 | throw new TokenizerException('File appears to be minified and cannot be processed'); |
266 | 264 | } |
@@ -277,8 +275,7 @@ discard block |
||
277 | 275 | * |
278 | 276 | * @return array |
279 | 277 | */ |
280 | - public function tokenize($string) |
|
281 | - { |
|
278 | + public function tokenize($string) { |
|
282 | 279 | if (PHP_CODESNIFFER_VERBOSITY > 1) { |
283 | 280 | echo "\t*** START JS TOKENIZING ***".PHP_EOL; |
284 | 281 | } |
@@ -913,8 +910,7 @@ discard block |
||
913 | 910 | * |
914 | 911 | * @return array<string, string>|null |
915 | 912 | */ |
916 | - public function getRegexToken($char, $string, $chars, $tokens) |
|
917 | - { |
|
913 | + public function getRegexToken($char, $string, $chars, $tokens) { |
|
918 | 914 | $beforeTokens = [ |
919 | 915 | T_EQUAL => true, |
920 | 916 | T_IS_NOT_EQUAL => true, |
@@ -1050,8 +1046,7 @@ discard block |
||
1050 | 1046 | * |
1051 | 1047 | * @return void |
1052 | 1048 | */ |
1053 | - public function processAdditional() |
|
1054 | - { |
|
1049 | + public function processAdditional() { |
|
1055 | 1050 | if (PHP_CODESNIFFER_VERBOSITY > 1) { |
1056 | 1051 | echo "\t*** START ADDITIONAL JS PROCESSING ***".PHP_EOL; |
1057 | 1052 | } |
@@ -11,8 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | use PHP_CodeSniffer\Util; |
13 | 13 | |
14 | -class Comment |
|
15 | -{ |
|
14 | +class Comment { |
|
16 | 15 | |
17 | 16 | |
18 | 17 | /** |
@@ -27,8 +26,7 @@ discard block |
||
27 | 26 | * |
28 | 27 | * @return array |
29 | 28 | */ |
30 | - public function tokenizeString($string, $eolChar, $stackPtr) |
|
31 | - { |
|
29 | + public function tokenizeString($string, $eolChar, $stackPtr) { |
|
32 | 30 | if (PHP_CODESNIFFER_VERBOSITY > 1) { |
33 | 31 | echo "\t\t*** START COMMENT TOKENIZING ***".PHP_EOL; |
34 | 32 | } |
@@ -173,8 +171,7 @@ discard block |
||
173 | 171 | * |
174 | 172 | * @return array |
175 | 173 | */ |
176 | - private function processLine($string, $eolChar, $start, $end) |
|
177 | - { |
|
174 | + private function processLine($string, $eolChar, $start, $end) { |
|
178 | 175 | $tokens = []; |
179 | 176 | |
180 | 177 | // Collect content padding. |
@@ -248,8 +245,7 @@ discard block |
||
248 | 245 | * |
249 | 246 | * @return array|null |
250 | 247 | */ |
251 | - private function collectWhitespace($string, $start, $end) |
|
252 | - { |
|
248 | + private function collectWhitespace($string, $start, $end) { |
|
253 | 249 | $space = ''; |
254 | 250 | for ($start; $start < $end; $start++) { |
255 | 251 | if ($string[$start] !== ' ' && $string[$start] !== "\t") { |
@@ -9,7 +9,6 @@ |
||
9 | 9 | |
10 | 10 | namespace PHP_CodeSniffer\Exceptions; |
11 | 11 | |
12 | -class TokenizerException extends \Exception |
|
13 | -{ |
|
12 | +class TokenizerException extends \Exception { |
|
14 | 13 | |
15 | 14 | }//end class |
@@ -9,7 +9,6 @@ |
||
9 | 9 | |
10 | 10 | namespace PHP_CodeSniffer\Exceptions; |
11 | 11 | |
12 | -class RuntimeException extends \RuntimeException |
|
13 | -{ |
|
12 | +class RuntimeException extends \RuntimeException { |
|
14 | 13 | |
15 | 14 | }//end class |
@@ -12,7 +12,6 @@ |
||
12 | 12 | |
13 | 13 | namespace PHP_CodeSniffer\Exceptions; |
14 | 14 | |
15 | -class DeepExitException extends \Exception |
|
16 | -{ |
|
15 | +class DeepExitException extends \Exception { |
|
17 | 16 | |
18 | 17 | }//end class |
@@ -16,8 +16,7 @@ discard block |
||
16 | 16 | use PHP_CodeSniffer\Exceptions\RuntimeException; |
17 | 17 | use PHP_CodeSniffer\Exceptions\TokenizerException; |
18 | 18 | |
19 | -class File |
|
20 | -{ |
|
19 | +class File { |
|
21 | 20 | |
22 | 21 | /** |
23 | 22 | * The absolute path to the file associated with this object. |
@@ -224,8 +223,7 @@ discard block |
||
224 | 223 | * |
225 | 224 | * @return void |
226 | 225 | */ |
227 | - public function __construct($path, Ruleset $ruleset, Config $config) |
|
228 | - { |
|
226 | + public function __construct($path, Ruleset $ruleset, Config $config) { |
|
229 | 227 | $this->path = $path; |
230 | 228 | $this->ruleset = $ruleset; |
231 | 229 | $this->config = $config; |
@@ -261,8 +259,7 @@ discard block |
||
261 | 259 | * |
262 | 260 | * @return void |
263 | 261 | */ |
264 | - public function setContent($content) |
|
265 | - { |
|
262 | + public function setContent($content) { |
|
266 | 263 | $this->content = $content; |
267 | 264 | $this->tokens = []; |
268 | 265 | |
@@ -284,8 +281,7 @@ discard block |
||
284 | 281 | * |
285 | 282 | * @return void |
286 | 283 | */ |
287 | - public function reloadContent() |
|
288 | - { |
|
284 | + public function reloadContent() { |
|
289 | 285 | |
290 | 286 | }//end reloadContent() |
291 | 287 | |
@@ -295,8 +291,7 @@ discard block |
||
295 | 291 | * |
296 | 292 | * @return void |
297 | 293 | */ |
298 | - public function disableCaching() |
|
299 | - { |
|
294 | + public function disableCaching() { |
|
300 | 295 | $this->configCache['cache'] = false; |
301 | 296 | |
302 | 297 | }//end disableCaching() |
@@ -307,8 +302,7 @@ discard block |
||
307 | 302 | * |
308 | 303 | * @return void |
309 | 304 | */ |
310 | - public function process() |
|
311 | - { |
|
305 | + public function process() { |
|
312 | 306 | if ($this->ignored === true) { |
313 | 307 | return; |
314 | 308 | } |
@@ -544,8 +538,7 @@ discard block |
||
544 | 538 | * |
545 | 539 | * @return void |
546 | 540 | */ |
547 | - public function parse() |
|
548 | - { |
|
541 | + public function parse() { |
|
549 | 542 | if (empty($this->tokens) === false) { |
550 | 543 | // File has already been parsed. |
551 | 544 | return; |
@@ -605,8 +598,7 @@ discard block |
||
605 | 598 | * |
606 | 599 | * @return array |
607 | 600 | */ |
608 | - public function getTokens() |
|
609 | - { |
|
601 | + public function getTokens() { |
|
610 | 602 | return $this->tokens; |
611 | 603 | |
612 | 604 | }//end getTokens() |
@@ -617,8 +609,7 @@ discard block |
||
617 | 609 | * |
618 | 610 | * @return void |
619 | 611 | */ |
620 | - public function cleanUp() |
|
621 | - { |
|
612 | + public function cleanUp() { |
|
622 | 613 | $this->listenerTimes = null; |
623 | 614 | $this->content = null; |
624 | 615 | $this->tokens = null; |
@@ -824,8 +815,7 @@ discard block |
||
824 | 815 | * |
825 | 816 | * @return boolean |
826 | 817 | */ |
827 | - protected function addMessage($error, $message, $line, $column, $code, $data, $severity, $fixable) |
|
828 | - { |
|
818 | + protected function addMessage($error, $message, $line, $column, $code, $data, $severity, $fixable) { |
|
829 | 819 | // Check if this line is ignoring all message codes. |
830 | 820 | if (isset($this->tokenizer->ignoredLines[$line]['.all']) === true) { |
831 | 821 | return false; |
@@ -1077,8 +1067,7 @@ discard block |
||
1077 | 1067 | * |
1078 | 1068 | * @return boolean |
1079 | 1069 | */ |
1080 | - public function recordMetric($stackPtr, $metric, $value) |
|
1081 | - { |
|
1070 | + public function recordMetric($stackPtr, $metric, $value) { |
|
1082 | 1071 | if (isset($this->metrics[$metric]) === false) { |
1083 | 1072 | $this->metrics[$metric] = ['values' => [$value => 1]]; |
1084 | 1073 | $this->metricTokens[$metric][$stackPtr] = true; |
@@ -1101,8 +1090,7 @@ discard block |
||
1101 | 1090 | * |
1102 | 1091 | * @return int |
1103 | 1092 | */ |
1104 | - public function getErrorCount() |
|
1105 | - { |
|
1093 | + public function getErrorCount() { |
|
1106 | 1094 | return $this->errorCount; |
1107 | 1095 | |
1108 | 1096 | }//end getErrorCount() |
@@ -1113,8 +1101,7 @@ discard block |
||
1113 | 1101 | * |
1114 | 1102 | * @return int |
1115 | 1103 | */ |
1116 | - public function getWarningCount() |
|
1117 | - { |
|
1104 | + public function getWarningCount() { |
|
1118 | 1105 | return $this->warningCount; |
1119 | 1106 | |
1120 | 1107 | }//end getWarningCount() |
@@ -1125,8 +1112,7 @@ discard block |
||
1125 | 1112 | * |
1126 | 1113 | * @return int |
1127 | 1114 | */ |
1128 | - public function getFixableCount() |
|
1129 | - { |
|
1115 | + public function getFixableCount() { |
|
1130 | 1116 | return $this->fixableCount; |
1131 | 1117 | |
1132 | 1118 | }//end getFixableCount() |
@@ -1137,8 +1123,7 @@ discard block |
||
1137 | 1123 | * |
1138 | 1124 | * @return int |
1139 | 1125 | */ |
1140 | - public function getFixedCount() |
|
1141 | - { |
|
1126 | + public function getFixedCount() { |
|
1142 | 1127 | return $this->fixedCount; |
1143 | 1128 | |
1144 | 1129 | }//end getFixedCount() |
@@ -1149,8 +1134,7 @@ discard block |
||
1149 | 1134 | * |
1150 | 1135 | * @return array |
1151 | 1136 | */ |
1152 | - public function getIgnoredLines() |
|
1153 | - { |
|
1137 | + public function getIgnoredLines() { |
|
1154 | 1138 | return $this->tokenizer->ignoredLines; |
1155 | 1139 | |
1156 | 1140 | }//end getIgnoredLines() |
@@ -1161,8 +1145,7 @@ discard block |
||
1161 | 1145 | * |
1162 | 1146 | * @return array |
1163 | 1147 | */ |
1164 | - public function getErrors() |
|
1165 | - { |
|
1148 | + public function getErrors() { |
|
1166 | 1149 | return $this->errors; |
1167 | 1150 | |
1168 | 1151 | }//end getErrors() |
@@ -1173,8 +1156,7 @@ discard block |
||
1173 | 1156 | * |
1174 | 1157 | * @return array |
1175 | 1158 | */ |
1176 | - public function getWarnings() |
|
1177 | - { |
|
1159 | + public function getWarnings() { |
|
1178 | 1160 | return $this->warnings; |
1179 | 1161 | |
1180 | 1162 | }//end getWarnings() |
@@ -1185,8 +1167,7 @@ discard block |
||
1185 | 1167 | * |
1186 | 1168 | * @return array |
1187 | 1169 | */ |
1188 | - public function getMetrics() |
|
1189 | - { |
|
1170 | + public function getMetrics() { |
|
1190 | 1171 | return $this->metrics; |
1191 | 1172 | |
1192 | 1173 | }//end getMetrics() |
@@ -1197,8 +1178,7 @@ discard block |
||
1197 | 1178 | * |
1198 | 1179 | * @return string |
1199 | 1180 | */ |
1200 | - public function getFilename() |
|
1201 | - { |
|
1181 | + public function getFilename() { |
|
1202 | 1182 | return $this->path; |
1203 | 1183 | |
1204 | 1184 | }//end getFilename() |
@@ -1216,8 +1196,7 @@ discard block |
||
1216 | 1196 | * T_FUNCTION, T_CLASS, T_ANON_CLASS, |
1217 | 1197 | * T_CLOSURE, T_TRAIT, or T_INTERFACE. |
1218 | 1198 | */ |
1219 | - public function getDeclarationName($stackPtr) |
|
1220 | - { |
|
1199 | + public function getDeclarationName($stackPtr) { |
|
1221 | 1200 | $tokenCode = $this->tokens[$stackPtr]['code']; |
1222 | 1201 | |
1223 | 1202 | if ($tokenCode === T_ANON_CLASS || $tokenCode === T_CLOSURE) { |
@@ -1282,8 +1261,7 @@ discard block |
||
1282 | 1261 | * @throws \PHP_CodeSniffer\Exceptions\TokenizerException If the specified $stackPtr is not of |
1283 | 1262 | * type T_FUNCTION or T_CLOSURE. |
1284 | 1263 | */ |
1285 | - public function getMethodParameters($stackPtr) |
|
1286 | - { |
|
1264 | + public function getMethodParameters($stackPtr) { |
|
1287 | 1265 | if ($this->tokens[$stackPtr]['code'] !== T_FUNCTION |
1288 | 1266 | && $this->tokens[$stackPtr]['code'] !== T_CLOSURE |
1289 | 1267 | ) { |
@@ -1474,8 +1452,7 @@ discard block |
||
1474 | 1452 | * @throws \PHP_CodeSniffer\Exceptions\TokenizerException If the specified position is not a |
1475 | 1453 | * T_FUNCTION token. |
1476 | 1454 | */ |
1477 | - public function getMethodProperties($stackPtr) |
|
1478 | - { |
|
1455 | + public function getMethodProperties($stackPtr) { |
|
1479 | 1456 | if ($this->tokens[$stackPtr]['code'] !== T_FUNCTION |
1480 | 1457 | && $this->tokens[$stackPtr]['code'] !== T_CLOSURE |
1481 | 1458 | ) { |
@@ -1624,8 +1601,7 @@ discard block |
||
1624 | 1601 | * T_VARIABLE token, or if the position is not |
1625 | 1602 | * a class member variable. |
1626 | 1603 | */ |
1627 | - public function getMemberProperties($stackPtr) |
|
1628 | - { |
|
1604 | + public function getMemberProperties($stackPtr) { |
|
1629 | 1605 | if ($this->tokens[$stackPtr]['code'] !== T_VARIABLE) { |
1630 | 1606 | throw new TokenizerException('$stackPtr must be of type T_VARIABLE'); |
1631 | 1607 | } |
@@ -1742,8 +1718,7 @@ discard block |
||
1742 | 1718 | * @throws \PHP_CodeSniffer\Exceptions\TokenizerException If the specified position is not a |
1743 | 1719 | * T_CLASS token. |
1744 | 1720 | */ |
1745 | - public function getClassProperties($stackPtr) |
|
1746 | - { |
|
1721 | + public function getClassProperties($stackPtr) { |
|
1747 | 1722 | if ($this->tokens[$stackPtr]['code'] !== T_CLASS) { |
1748 | 1723 | throw new TokenizerException('$stackPtr must be of type T_CLASS'); |
1749 | 1724 | } |
@@ -1793,8 +1768,7 @@ discard block |
||
1793 | 1768 | * |
1794 | 1769 | * @return boolean |
1795 | 1770 | */ |
1796 | - public function isReference($stackPtr) |
|
1797 | - { |
|
1771 | + public function isReference($stackPtr) { |
|
1798 | 1772 | if ($this->tokens[$stackPtr]['code'] !== T_BITWISE_AND) { |
1799 | 1773 | return false; |
1800 | 1774 | } |
@@ -1927,8 +1901,7 @@ discard block |
||
1927 | 1901 | * |
1928 | 1902 | * @return string The token contents. |
1929 | 1903 | */ |
1930 | - public function getTokensAsString($start, $length, $origContent=false) |
|
1931 | - { |
|
1904 | + public function getTokensAsString($start, $length, $origContent=false) { |
|
1932 | 1905 | if (is_int($start) === false || isset($this->tokens[$start]) === false) { |
1933 | 1906 | throw new RuntimeException('The $start position for getTokensAsString() must exist in the token stack'); |
1934 | 1907 | } |
@@ -2114,8 +2087,7 @@ discard block |
||
2114 | 2087 | * |
2115 | 2088 | * @return int |
2116 | 2089 | */ |
2117 | - public function findStartOfStatement($start, $ignore=null) |
|
2118 | - { |
|
2090 | + public function findStartOfStatement($start, $ignore=null) { |
|
2119 | 2091 | $endTokens = Util\Tokens::$blockOpeners; |
2120 | 2092 | |
2121 | 2093 | $endTokens[T_COLON] = true; |
@@ -2177,8 +2149,7 @@ discard block |
||
2177 | 2149 | * |
2178 | 2150 | * @return int |
2179 | 2151 | */ |
2180 | - public function findEndOfStatement($start, $ignore=null) |
|
2181 | - { |
|
2152 | + public function findEndOfStatement($start, $ignore=null) { |
|
2182 | 2153 | $endTokens = [ |
2183 | 2154 | T_COLON => true, |
2184 | 2155 | T_COMMA => true, |
@@ -2264,8 +2235,7 @@ discard block |
||
2264 | 2235 | * |
2265 | 2236 | * @return int | bool |
2266 | 2237 | */ |
2267 | - public function findFirstOnLine($types, $start, $exclude=false, $value=null) |
|
2268 | - { |
|
2238 | + public function findFirstOnLine($types, $start, $exclude=false, $value=null) { |
|
2269 | 2239 | if (is_array($types) === false) { |
2270 | 2240 | $types = [$types]; |
2271 | 2241 | } |
@@ -2314,8 +2284,7 @@ discard block |
||
2314 | 2284 | * |
2315 | 2285 | * @return boolean |
2316 | 2286 | */ |
2317 | - public function hasCondition($stackPtr, $types) |
|
2318 | - { |
|
2287 | + public function hasCondition($stackPtr, $types) { |
|
2319 | 2288 | // Check for the existence of the token. |
2320 | 2289 | if (isset($this->tokens[$stackPtr]) === false) { |
2321 | 2290 | return false; |
@@ -2351,8 +2320,7 @@ discard block |
||
2351 | 2320 | * |
2352 | 2321 | * @return int |
2353 | 2322 | */ |
2354 | - public function getCondition($stackPtr, $type) |
|
2355 | - { |
|
2323 | + public function getCondition($stackPtr, $type) { |
|
2356 | 2324 | // Check for the existence of the token. |
2357 | 2325 | if (isset($this->tokens[$stackPtr]) === false) { |
2358 | 2326 | return false; |
@@ -2385,8 +2353,7 @@ discard block |
||
2385 | 2353 | * |
2386 | 2354 | * @return string|false |
2387 | 2355 | */ |
2388 | - public function findExtendedClassName($stackPtr) |
|
2389 | - { |
|
2356 | + public function findExtendedClassName($stackPtr) { |
|
2390 | 2357 | // Check for the existence of the token. |
2391 | 2358 | if (isset($this->tokens[$stackPtr]) === false) { |
2392 | 2359 | return false; |
@@ -2437,8 +2404,7 @@ discard block |
||
2437 | 2404 | * |
2438 | 2405 | * @return array|false |
2439 | 2406 | */ |
2440 | - public function findImplementedInterfaceNames($stackPtr) |
|
2441 | - { |
|
2407 | + public function findImplementedInterfaceNames($stackPtr) { |
|
2442 | 2408 | // Check for the existence of the token. |
2443 | 2409 | if (isset($this->tokens[$stackPtr]) === false) { |
2444 | 2410 | return false; |
@@ -64,8 +64,7 @@ discard block |
||
64 | 64 | * |
65 | 65 | * @return void |
66 | 66 | */ |
67 | - public function __construct(Config $config, Ruleset $ruleset) |
|
68 | - { |
|
67 | + public function __construct(Config $config, Ruleset $ruleset) { |
|
69 | 68 | $this->ruleset = $ruleset; |
70 | 69 | $this->config = $config; |
71 | 70 | |
@@ -108,8 +107,7 @@ discard block |
||
108 | 107 | * |
109 | 108 | * @return void |
110 | 109 | */ |
111 | - public function addFile($path, $file=null) |
|
112 | - { |
|
110 | + public function addFile($path, $file=null) { |
|
113 | 111 | // No filtering is done for STDIN when the filename |
114 | 112 | // has not been specified. |
115 | 113 | if ($path === 'STDIN') { |
@@ -137,8 +135,7 @@ discard block |
||
137 | 135 | * |
138 | 136 | * @return string |
139 | 137 | */ |
140 | - private function getFilterClass() |
|
141 | - { |
|
138 | + private function getFilterClass() { |
|
142 | 139 | $filterType = $this->config->filter; |
143 | 140 | |
144 | 141 | if ($filterType === null) { |
@@ -168,8 +165,7 @@ discard block |
||
168 | 165 | * |
169 | 166 | * @return void |
170 | 167 | */ |
171 | - public function rewind() |
|
172 | - { |
|
168 | + public function rewind() { |
|
173 | 169 | reset($this->files); |
174 | 170 | |
175 | 171 | }//end rewind() |
@@ -180,8 +176,7 @@ discard block |
||
180 | 176 | * |
181 | 177 | * @return \PHP_CodeSniffer\Files\File |
182 | 178 | */ |
183 | - public function current() |
|
184 | - { |
|
179 | + public function current() { |
|
185 | 180 | $path = key($this->files); |
186 | 181 | if ($this->files[$path] === null) { |
187 | 182 | $this->files[$path] = new LocalFile($path, $this->ruleset, $this->config); |
@@ -197,8 +192,7 @@ discard block |
||
197 | 192 | * |
198 | 193 | * @return void |
199 | 194 | */ |
200 | - public function key() |
|
201 | - { |
|
195 | + public function key() { |
|
202 | 196 | return key($this->files); |
203 | 197 | |
204 | 198 | }//end key() |
@@ -209,8 +203,7 @@ discard block |
||
209 | 203 | * |
210 | 204 | * @return void |
211 | 205 | */ |
212 | - public function next() |
|
213 | - { |
|
206 | + public function next() { |
|
214 | 207 | next($this->files); |
215 | 208 | |
216 | 209 | }//end next() |
@@ -221,8 +214,7 @@ discard block |
||
221 | 214 | * |
222 | 215 | * @return boolean |
223 | 216 | */ |
224 | - public function valid() |
|
225 | - { |
|
217 | + public function valid() { |
|
226 | 218 | if (current($this->files) === false) { |
227 | 219 | return false; |
228 | 220 | } |
@@ -237,8 +229,7 @@ discard block |
||
237 | 229 | * |
238 | 230 | * @return integer |
239 | 231 | */ |
240 | - public function count() |
|
241 | - { |
|
232 | + public function count() { |
|
242 | 233 | return $this->numFiles; |
243 | 234 | |
244 | 235 | }//end count() |
@@ -13,8 +13,7 @@ discard block |
||
13 | 13 | use PHP_CodeSniffer\Config; |
14 | 14 | use PHP_CodeSniffer\Util\Cache; |
15 | 15 | |
16 | -class LocalFile extends File |
|
17 | -{ |
|
16 | +class LocalFile extends File { |
|
18 | 17 | |
19 | 18 | |
20 | 19 | /** |
@@ -26,8 +25,7 @@ discard block |
||
26 | 25 | * |
27 | 26 | * @return void |
28 | 27 | */ |
29 | - public function __construct($path, Ruleset $ruleset, Config $config) |
|
30 | - { |
|
28 | + public function __construct($path, Ruleset $ruleset, Config $config) { |
|
31 | 29 | $this->path = trim($path); |
32 | 30 | if (is_readable($this->path) === false) { |
33 | 31 | parent::__construct($this->path, $ruleset, $config); |
@@ -69,8 +67,7 @@ discard block |
||
69 | 67 | * |
70 | 68 | * @return void |
71 | 69 | */ |
72 | - public function reloadContent() |
|
73 | - { |
|
70 | + public function reloadContent() { |
|
74 | 71 | $this->setContent(file_get_contents($this->path)); |
75 | 72 | |
76 | 73 | }//end reloadContent() |
@@ -81,8 +78,7 @@ discard block |
||
81 | 78 | * |
82 | 79 | * @return void |
83 | 80 | */ |
84 | - public function process() |
|
85 | - { |
|
81 | + public function process() { |
|
86 | 82 | if ($this->ignored === true) { |
87 | 83 | return; |
88 | 84 | } |
@@ -163,8 +159,7 @@ discard block |
||
163 | 159 | * |
164 | 160 | * @return void |
165 | 161 | */ |
166 | - private function replayErrors($errors, $warnings) |
|
167 | - { |
|
162 | + private function replayErrors($errors, $warnings) { |
|
168 | 163 | $this->errors = []; |
169 | 164 | $this->warnings = []; |
170 | 165 | $this->errorCount = 0; |
@@ -17,8 +17,7 @@ discard block |
||
17 | 17 | use PHP_CodeSniffer\Ruleset; |
18 | 18 | use PHP_CodeSniffer\Config; |
19 | 19 | |
20 | -class DummyFile extends File |
|
21 | -{ |
|
20 | +class DummyFile extends File { |
|
22 | 21 | |
23 | 22 | |
24 | 23 | /** |
@@ -30,8 +29,7 @@ discard block |
||
30 | 29 | * |
31 | 30 | * @return void |
32 | 31 | */ |
33 | - public function __construct($content, Ruleset $ruleset, Config $config) |
|
34 | - { |
|
32 | + public function __construct($content, Ruleset $ruleset, Config $config) { |
|
35 | 33 | $this->setContent($content); |
36 | 34 | |
37 | 35 | // See if a filename was defined in the content. |
@@ -69,8 +67,7 @@ discard block |
||
69 | 67 | * |
70 | 68 | * @return void |
71 | 69 | */ |
72 | - public function setErrorCounts($errorCount, $warningCount, $fixableCount, $fixedCount) |
|
73 | - { |
|
70 | + public function setErrorCounts($errorCount, $warningCount, $fixableCount, $fixedCount) { |
|
74 | 71 | $this->errorCount = $errorCount; |
75 | 72 | $this->warningCount = $warningCount; |
76 | 73 | $this->fixableCount = $fixableCount; |