@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | * |
30 | 30 | * @return bool |
31 | 31 | */ |
32 | - public function generateFileReport($report, File $phpcsFile, $showSources=false, $width=80); |
|
32 | + public function generateFileReport($report, File $phpcsFile, $showSources = false, $width = 80); |
|
33 | 33 | |
34 | 34 | |
35 | 35 | /** |
@@ -54,10 +54,10 @@ discard block |
||
54 | 54 | $totalErrors, |
55 | 55 | $totalWarnings, |
56 | 56 | $totalFixable, |
57 | - $showSources=false, |
|
58 | - $width=80, |
|
59 | - $interactive=false, |
|
60 | - $toScreen=true |
|
57 | + $showSources = false, |
|
58 | + $width = 80, |
|
59 | + $interactive = false, |
|
60 | + $toScreen = true |
|
61 | 61 | ); |
62 | 62 | |
63 | 63 |
@@ -46,7 +46,7 @@ |
||
46 | 46 | } |
47 | 47 | |
48 | 48 | $testName = ltrim($methodName, '_'); |
49 | - if ($testName !== '' && Common::isCamelCaps($testName, false, true, false) === false) { |
|
49 | + if ($testName !== '' && Common::isCamelCaps($testName, false, true, false) === false) { |
|
50 | 50 | $error = 'Method name "%s" is not in camel caps format'; |
51 | 51 | $className = $phpcsFile->getDeclarationName($currScope); |
52 | 52 | $errorData = array($className.'::'.$methodName); |
@@ -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 |
@@ -45,12 +45,12 @@ |
||
45 | 45 | public function getWarningList($testFile='') |
46 | 46 | { |
47 | 47 | switch ($testFile) { |
48 | - case 'SideEffectsUnitTest.3.inc': |
|
49 | - case 'SideEffectsUnitTest.4.inc': |
|
50 | - case 'SideEffectsUnitTest.5.inc': |
|
51 | - return array(1 => 1); |
|
52 | - default: |
|
53 | - return array(); |
|
48 | + case 'SideEffectsUnitTest.3.inc': |
|
49 | + case 'SideEffectsUnitTest.4.inc': |
|
50 | + case 'SideEffectsUnitTest.5.inc': |
|
51 | + return array(1 => 1); |
|
52 | + default: |
|
53 | + return array(); |
|
54 | 54 | }//end switch |
55 | 55 | |
56 | 56 | }//end getWarningList() |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | * |
41 | 41 | * @return array<int, int> |
42 | 42 | */ |
43 | - public function getErrorList($testFile='') |
|
43 | + public function getErrorList($testFile = '') |
|
44 | 44 | { |
45 | 45 | switch ($testFile) { |
46 | 46 | case 'EndFileNoNewlineUnitTest.1.inc': |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | * |
76 | 76 | * @return array<int, int> |
77 | 77 | */ |
78 | - public function getWarningList($testFile='') |
|
78 | + public function getWarningList($testFile = '') |
|
79 | 79 | { |
80 | 80 | return array(); |
81 | 81 |
@@ -13,7 +13,7 @@ |
||
13 | 13 | echo $object->define(); |
14 | 14 | echo $object -> define(); |
15 | 15 | |
16 | -$c = new class extends Something{ |
|
16 | +$c = new class extends Something { |
|
17 | 17 | |
18 | 18 | public function someMethod() |
19 | 19 | { |
@@ -7,9 +7,9 @@ |
||
7 | 7 | use Something; |
8 | 8 | use SomethingElse; |
9 | 9 | |
10 | -declare(ticks=1); |
|
10 | +declare(ticks = 1); |
|
11 | 11 | |
12 | -declare(ticks=1) { |
|
12 | +declare(ticks = 1) { |
|
13 | 13 | // Code. |
14 | 14 | } |
15 | 15 |
@@ -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 |
@@ -46,7 +46,7 @@ |
||
46 | 46 | case 'CharacterBeforePHPOpeningTagUnitTest.1.inc': |
47 | 47 | return array( |
48 | 48 | 2 => 1, |
49 | - ); |
|
49 | + ); |
|
50 | 50 | break; |
51 | 51 | default: |
52 | 52 | return array(); |
@@ -40,7 +40,7 @@ |
||
40 | 40 | * |
41 | 41 | * @return array<int, int> |
42 | 42 | */ |
43 | - public function getErrorList($testFile='') |
|
43 | + public function getErrorList($testFile = '') |
|
44 | 44 | { |
45 | 45 | switch ($testFile) { |
46 | 46 | case 'CharacterBeforePHPOpeningTagUnitTest.1.inc': |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | private $_ignore = array( |
43 | 43 | T_WHITESPACE, |
44 | 44 | T_COMMENT, |
45 | - ); |
|
45 | + ); |
|
46 | 46 | |
47 | 47 | |
48 | 48 | /** |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | 'http_response_header', |
73 | 73 | 'HTTP_RAW_POST_DATA', |
74 | 74 | 'php_errormsg', |
75 | - ); |
|
75 | + ); |
|
76 | 76 | |
77 | 77 | // If it's a php reserved var, then its ok. |
78 | 78 | if (in_array($varName, $phpReservedVars) === true) { |
@@ -171,9 +171,9 @@ discard block |
||
171 | 171 | $scope = ucfirst($memberProps['scope']); |
172 | 172 | $error = '%s member variable "%s" must contain a leading underscore'; |
173 | 173 | $data = array( |
174 | - $scope, |
|
175 | - $varName, |
|
176 | - ); |
|
174 | + $scope, |
|
175 | + $varName, |
|
176 | + ); |
|
177 | 177 | $phpcsFile->addError($error, $stackPtr, 'PrivateNoUnderscore', $data); |
178 | 178 | return; |
179 | 179 | } |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | 'http_response_header', |
219 | 219 | 'HTTP_RAW_POST_DATA', |
220 | 220 | 'php_errormsg', |
221 | - ); |
|
221 | + ); |
|
222 | 222 | |
223 | 223 | if (preg_match_all('|[^\\\]\$([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)|', $tokens[$stackPtr]['content'], $matches) !== 0) { |
224 | 224 | foreach ($matches[1] as $varName) { |