@@ -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 | |
@@ -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': |
@@ -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 | |
@@ -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) { |
@@ -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': |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | { |
| 45 | 45 | return array( |
| 46 | 46 | 73 => 1, |
| 47 | - ); |
|
| 47 | + ); |
|
| 48 | 48 | |
| 49 | 49 | }//end getErrorList() |
| 50 | 50 | |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | return array( |
| 63 | 63 | 27 => 1, |
| 64 | 64 | 46 => 1, |
| 65 | - ); |
|
| 65 | + ); |
|
| 66 | 66 | |
| 67 | 67 | }//end getWarningList() |
| 68 | 68 | |
@@ -36,10 +36,10 @@ discard block |
||
| 36 | 36 | * @var array |
| 37 | 37 | */ |
| 38 | 38 | public $supportedTokenizers = array( |
| 39 | - 'PHP', |
|
| 40 | - 'JS', |
|
| 41 | - 'CSS', |
|
| 42 | - ); |
|
| 39 | + 'PHP', |
|
| 40 | + 'JS', |
|
| 41 | + 'CSS', |
|
| 42 | + ); |
|
| 43 | 43 | |
| 44 | 44 | /** |
| 45 | 45 | * The valid EOL character. |
@@ -100,8 +100,8 @@ discard block |
||
| 100 | 100 | $expected = str_replace("\n", '\n', $expected); |
| 101 | 101 | $expected = str_replace("\r", '\r', $expected); |
| 102 | 102 | $data = array( |
| 103 | - $expected, |
|
| 104 | - $found, |
|
| 103 | + $expected, |
|
| 104 | + $found, |
|
| 105 | 105 | ); |
| 106 | 106 | |
| 107 | 107 | // Errors are always reported on line 1, no matter where the first PHP tag is. |
@@ -110,18 +110,18 @@ |
||
| 110 | 110 | if ($fix === true) { |
| 111 | 111 | $tokens = $phpcsFile->getTokens(); |
| 112 | 112 | switch ($this->eolChar) { |
| 113 | - case '\n': |
|
| 114 | - $eolChar = "\n"; |
|
| 115 | - break; |
|
| 116 | - case '\r': |
|
| 117 | - $eolChar = "\r"; |
|
| 118 | - break; |
|
| 119 | - case '\r\n': |
|
| 120 | - $eolChar = "\r\n"; |
|
| 121 | - break; |
|
| 122 | - default: |
|
| 123 | - $eolChar = $this->eolChar; |
|
| 124 | - break; |
|
| 113 | + case '\n': |
|
| 114 | + $eolChar = "\n"; |
|
| 115 | + break; |
|
| 116 | + case '\r': |
|
| 117 | + $eolChar = "\r"; |
|
| 118 | + break; |
|
| 119 | + case '\r\n': |
|
| 120 | + $eolChar = "\r\n"; |
|
| 121 | + break; |
|
| 122 | + default: |
|
| 123 | + $eolChar = $this->eolChar; |
|
| 124 | + break; |
|
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | for ($i = 0; $i < $phpcsFile->numTokens; $i++) { |
@@ -38,10 +38,10 @@ |
||
| 38 | 38 | * @var array |
| 39 | 39 | */ |
| 40 | 40 | public $bomDefinitions = array( |
| 41 | - 'UTF-8' => 'efbbbf', |
|
| 42 | - 'UTF-16 (BE)' => 'feff', |
|
| 43 | - 'UTF-16 (LE)' => 'fffe', |
|
| 44 | - ); |
|
| 41 | + 'UTF-8' => 'efbbbf', |
|
| 42 | + 'UTF-16 (BE)' => 'feff', |
|
| 43 | + 'UTF-16 (LE)' => 'fffe', |
|
| 44 | + ); |
|
| 45 | 45 | |
| 46 | 46 | |
| 47 | 47 | /** |