@@ -42,7 +42,7 @@ |
||
| 42 | 42 | { |
| 43 | 43 | return array( |
| 44 | 44 | 4 => 1, |
| 45 | - ); |
|
| 45 | + ); |
|
| 46 | 46 | |
| 47 | 47 | }//end getErrorList() |
| 48 | 48 | |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | 43 => 2, |
| 52 | 52 | 91 => 1, |
| 53 | 53 | 123 => 1, |
| 54 | - ); |
|
| 54 | + ); |
|
| 55 | 55 | |
| 56 | 56 | }//end getErrorList() |
| 57 | 57 | |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | * |
| 41 | 41 | * @return array<int, int> |
| 42 | 42 | */ |
| 43 | - public function getErrorList($testFile='CreateWidgetTypeCallbackUnitTest.js') |
|
| 43 | + public function getErrorList($testFile = 'CreateWidgetTypeCallbackUnitTest.js') |
|
| 44 | 44 | { |
| 45 | 45 | return array( |
| 46 | 46 | 18 => 1, |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | T_FINAL, |
| 49 | 49 | T_VAR, |
| 50 | 50 | T_CONST, |
| 51 | - ); |
|
| 51 | + ); |
|
| 52 | 52 | |
| 53 | 53 | }//end register() |
| 54 | 54 | |
@@ -70,10 +70,10 @@ discard block |
||
| 70 | 70 | if ($content !== strtolower($content)) { |
| 71 | 71 | $error = '%s keyword must be lowercase; expected "%s" but found "%s"'; |
| 72 | 72 | $data = array( |
| 73 | - strtoupper($content), |
|
| 74 | - strtolower($content), |
|
| 75 | - $content, |
|
| 76 | - ); |
|
| 73 | + strtoupper($content), |
|
| 74 | + strtolower($content), |
|
| 75 | + $content, |
|
| 76 | + ); |
|
| 77 | 77 | |
| 78 | 78 | $fix = $phpcsFile->addFixableError($error, $stackPtr, 'FoundUppercase', $data); |
| 79 | 79 | if ($fix === true) { |
@@ -63,8 +63,8 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | $properties = array(); |
| 65 | 65 | $wantedTokens = array( |
| 66 | - T_PROPERTY, |
|
| 67 | - T_OBJECT, |
|
| 66 | + T_PROPERTY, |
|
| 67 | + T_OBJECT, |
|
| 68 | 68 | ); |
| 69 | 69 | |
| 70 | 70 | $next = $phpcsFile->findNext($wantedTokens, ($stackPtr + 1), $tokens[$stackPtr]['bracket_closer']); |
@@ -77,9 +77,9 @@ discard block |
||
| 77 | 77 | if (isset($properties[$propName]) === true) { |
| 78 | 78 | $error = 'Duplicate property definition found for "%s"; previously defined on line %s'; |
| 79 | 79 | $data = array( |
| 80 | - $propName, |
|
| 81 | - $tokens[$properties[$propName]]['line'], |
|
| 82 | - ); |
|
| 80 | + $propName, |
|
| 81 | + $tokens[$properties[$propName]]['line'], |
|
| 82 | + ); |
|
| 83 | 83 | $phpcsFile->addError($error, $next, 'Found', $data); |
| 84 | 84 | } |
| 85 | 85 | |
@@ -91,9 +91,9 @@ discard block |
||
| 91 | 91 | $type = strtolower($tokens[$stackPtr]['content']); |
| 92 | 92 | $error = 'Expected 0 spaces before %s keyword; %s found'; |
| 93 | 93 | $data = array( |
| 94 | - $type, |
|
| 95 | - $spaces, |
|
| 96 | - ); |
|
| 94 | + $type, |
|
| 95 | + $spaces, |
|
| 96 | + ); |
|
| 97 | 97 | |
| 98 | 98 | $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceBeforeKeyword', $data); |
| 99 | 99 | if ($fix === true) { |
@@ -188,9 +188,9 @@ discard block |
||
| 188 | 188 | if ($difference !== -1 && $difference !== 1) { |
| 189 | 189 | $error = 'Closing brace of a %s must be followed by a single blank line; found %s'; |
| 190 | 190 | $data = array( |
| 191 | - $tokens[$stackPtr]['content'], |
|
| 192 | - $difference, |
|
| 193 | - ); |
|
| 191 | + $tokens[$stackPtr]['content'], |
|
| 192 | + $difference, |
|
| 193 | + ); |
|
| 194 | 194 | $fix = $phpcsFile->addFixableError($error, $closeBrace, 'NewlinesAfterCloseBrace', $data); |
| 195 | 195 | if ($fix === true) { |
| 196 | 196 | if ($difference === 0) { |
@@ -191,7 +191,7 @@ |
||
| 191 | 191 | $tokens[$stackPtr]['content'], |
| 192 | 192 | $difference, |
| 193 | 193 | ); |
| 194 | - $fix = $phpcsFile->addFixableError($error, $closeBrace, 'NewlinesAfterCloseBrace', $data); |
|
| 194 | + $fix = $phpcsFile->addFixableError($error, $closeBrace, 'NewlinesAfterCloseBrace', $data); |
|
| 195 | 195 | if ($fix === true) { |
| 196 | 196 | if ($difference === 0) { |
| 197 | 197 | $first = $phpcsFile->findFirstOnLine(array(), $nextContent, true); |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | return array( |
| 43 | 43 | T_CLASS, |
| 44 | 44 | T_INTERFACE, |
| 45 | - ); |
|
| 45 | + ); |
|
| 46 | 46 | |
| 47 | 47 | }//end register() |
| 48 | 48 | |
@@ -71,10 +71,10 @@ discard block |
||
| 71 | 71 | if ($tokens[$decName]['content'] !== $fileName) { |
| 72 | 72 | $error = '%s name doesn\'t match filename; expected "%s %s"'; |
| 73 | 73 | $data = array( |
| 74 | - ucfirst($tokens[$stackPtr]['content']), |
|
| 75 | - $tokens[$stackPtr]['content'], |
|
| 76 | - $fileName, |
|
| 77 | - ); |
|
| 74 | + ucfirst($tokens[$stackPtr]['content']), |
|
| 75 | + $tokens[$stackPtr]['content'], |
|
| 76 | + $fileName, |
|
| 77 | + ); |
|
| 78 | 78 | $phpcsFile->addError($error, $stackPtr, 'NoMatch', $data); |
| 79 | 79 | } |
| 80 | 80 | |
@@ -50,9 +50,9 @@ discard block |
||
| 50 | 50 | * @var array |
| 51 | 51 | */ |
| 52 | 52 | public $supportedTokenizers = array( |
| 53 | - 'PHP', |
|
| 54 | - 'JS', |
|
| 55 | - ); |
|
| 53 | + 'PHP', |
|
| 54 | + 'JS', |
|
| 55 | + ); |
|
| 56 | 56 | |
| 57 | 57 | |
| 58 | 58 | /** |
@@ -106,9 +106,9 @@ discard block |
||
| 106 | 106 | if ($spaceAfterOpen !== $this->requiredSpacesAfterOpen) { |
| 107 | 107 | $error = 'Expected %s spaces after opening bracket; %s found'; |
| 108 | 108 | $data = array( |
| 109 | - $this->requiredSpacesAfterOpen, |
|
| 110 | - $spaceAfterOpen, |
|
| 111 | - ); |
|
| 109 | + $this->requiredSpacesAfterOpen, |
|
| 110 | + $spaceAfterOpen, |
|
| 111 | + ); |
|
| 112 | 112 | $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterOpen', $data); |
| 113 | 113 | if ($fix === true) { |
| 114 | 114 | $padding = str_repeat(' ', $this->requiredSpacesAfterOpen); |
@@ -136,9 +136,9 @@ discard block |
||
| 136 | 136 | if ($this->requiredSpacesBeforeClose !== $spaceBeforeClose) { |
| 137 | 137 | $error = 'Expected %s spaces before closing bracket; %s found'; |
| 138 | 138 | $data = array( |
| 139 | - $this->requiredSpacesBeforeClose, |
|
| 140 | - $spaceBeforeClose, |
|
| 141 | - ); |
|
| 139 | + $this->requiredSpacesBeforeClose, |
|
| 140 | + $spaceBeforeClose, |
|
| 141 | + ); |
|
| 142 | 142 | $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBeforeClose', $data); |
| 143 | 143 | if ($fix === true) { |
| 144 | 144 | $padding = str_repeat(' ', $this->requiredSpacesBeforeClose); |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | $this->requiredSpacesAfterOpen, |
| 110 | 110 | $spaceAfterOpen, |
| 111 | 111 | ); |
| 112 | - $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterOpen', $data); |
|
| 112 | + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterOpen', $data); |
|
| 113 | 113 | if ($fix === true) { |
| 114 | 114 | $padding = str_repeat(' ', $this->requiredSpacesAfterOpen); |
| 115 | 115 | if ($spaceAfterOpen === 0) { |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | $this->requiredSpacesBeforeClose, |
| 140 | 140 | $spaceBeforeClose, |
| 141 | 141 | ); |
| 142 | - $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBeforeClose', $data); |
|
| 142 | + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBeforeClose', $data); |
|
| 143 | 143 | if ($fix === true) { |
| 144 | 144 | $padding = str_repeat(' ', $this->requiredSpacesBeforeClose); |
| 145 | 145 | if ($spaceBeforeClose === 0) { |
@@ -103,9 +103,9 @@ discard block |
||
| 103 | 103 | if ($spaceAfterOpen !== $this->requiredSpacesAfterOpen) { |
| 104 | 104 | $error = 'Expected %s spaces after opening bracket; %s found'; |
| 105 | 105 | $data = array( |
| 106 | - $this->requiredSpacesAfterOpen, |
|
| 107 | - $spaceAfterOpen, |
|
| 108 | - ); |
|
| 106 | + $this->requiredSpacesAfterOpen, |
|
| 107 | + $spaceAfterOpen, |
|
| 108 | + ); |
|
| 109 | 109 | $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterOpen', $data); |
| 110 | 110 | if ($fix === true) { |
| 111 | 111 | $padding = str_repeat(' ', $this->requiredSpacesAfterOpen); |
@@ -133,9 +133,9 @@ discard block |
||
| 133 | 133 | if ($spaceBeforeClose !== $this->requiredSpacesBeforeClose) { |
| 134 | 134 | $error = 'Expected %s spaces before closing bracket; %s found'; |
| 135 | 135 | $data = array( |
| 136 | - $this->requiredSpacesBeforeClose, |
|
| 137 | - $spaceBeforeClose, |
|
| 138 | - ); |
|
| 136 | + $this->requiredSpacesBeforeClose, |
|
| 137 | + $spaceBeforeClose, |
|
| 138 | + ); |
|
| 139 | 139 | $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceBeforeClose', $data); |
| 140 | 140 | if ($fix === true) { |
| 141 | 141 | $padding = str_repeat(' ', $this->requiredSpacesBeforeClose); |
@@ -160,8 +160,8 @@ discard block |
||
| 160 | 160 | $expected = strtolower($content); |
| 161 | 161 | $error = 'AS keyword must be lowercase; expected "%s" but found "%s"'; |
| 162 | 162 | $data = array( |
| 163 | - $expected, |
|
| 164 | - $content, |
|
| 163 | + $expected, |
|
| 164 | + $content, |
|
| 165 | 165 | ); |
| 166 | 166 | |
| 167 | 167 | $fix = $phpcsFile->addFixableError($error, $asToken, 'AsNotLower', $data); |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | $this->requiredSpacesAfterOpen, |
| 107 | 107 | $spaceAfterOpen, |
| 108 | 108 | ); |
| 109 | - $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterOpen', $data); |
|
| 109 | + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterOpen', $data); |
|
| 110 | 110 | if ($fix === true) { |
| 111 | 111 | $padding = str_repeat(' ', $this->requiredSpacesAfterOpen); |
| 112 | 112 | if ($spaceAfterOpen === 0) { |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | $this->requiredSpacesBeforeClose, |
| 137 | 137 | $spaceBeforeClose, |
| 138 | 138 | ); |
| 139 | - $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceBeforeClose', $data); |
|
| 139 | + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceBeforeClose', $data); |
|
| 140 | 140 | if ($fix === true) { |
| 141 | 141 | $padding = str_repeat(' ', $this->requiredSpacesBeforeClose); |
| 142 | 142 | if ($spaceBeforeClose === 0) { |
@@ -32,9 +32,9 @@ discard block |
||
| 32 | 32 | * @var array |
| 33 | 33 | */ |
| 34 | 34 | public $supportedTokenizers = array( |
| 35 | - 'PHP', |
|
| 36 | - 'JS', |
|
| 37 | - ); |
|
| 35 | + 'PHP', |
|
| 36 | + 'JS', |
|
| 37 | + ); |
|
| 38 | 38 | |
| 39 | 39 | |
| 40 | 40 | /** |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | T_ELSE, |
| 56 | 56 | T_ELSEIF, |
| 57 | 57 | T_SWITCH, |
| 58 | - ); |
|
| 58 | + ); |
|
| 59 | 59 | |
| 60 | 60 | }//end register() |
| 61 | 61 | |
@@ -92,9 +92,9 @@ discard block |
||
| 92 | 92 | if ($found !== 1) { |
| 93 | 93 | $error = 'Expected 1 space after %s keyword; %s found'; |
| 94 | 94 | $data = array( |
| 95 | - strtoupper($tokens[$stackPtr]['content']), |
|
| 96 | - $found, |
|
| 97 | - ); |
|
| 95 | + strtoupper($tokens[$stackPtr]['content']), |
|
| 96 | + $found, |
|
| 97 | + ); |
|
| 98 | 98 | |
| 99 | 99 | $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterKeyword', $data); |
| 100 | 100 | if ($fix === true) { |