@@ -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 |
@@ -35,8 +35,8 @@ |
||
35 | 35 | } |
36 | 36 | |
37 | 37 | class IncorrectBracePlacement |
38 | - { |
|
39 | - } |
|
38 | + { |
|
39 | + } |
|
40 | 40 | |
41 | 41 | abstract class CodeSnifferFail |
42 | 42 | extends |
@@ -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 | * @var array |
46 | 46 | */ |
47 | 47 | protected $specificStylesheets = array( |
48 | - 'moz' => true, |
|
49 | - 'ie' => true, |
|
50 | - 'ie7' => true, |
|
51 | - 'ie8' => true, |
|
52 | - 'webkit' => true, |
|
53 | - ); |
|
48 | + 'moz' => true, |
|
49 | + 'ie' => true, |
|
50 | + 'ie7' => true, |
|
51 | + 'ie8' => true, |
|
52 | + 'webkit' => true, |
|
53 | + ); |
|
54 | 54 | |
55 | 55 | |
56 | 56 | /** |
@@ -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 |
@@ -110,7 +110,7 @@ |
||
110 | 110 | $data = array( |
111 | 111 | $code, |
112 | 112 | $error, |
113 | - ); |
|
113 | + ); |
|
114 | 114 | if (in_array($code, $this->errorCodes) === true) { |
115 | 115 | $phpcsFile->addErrorOnLine($message, $line, 'ExternalToolError', $data); |
116 | 116 | } else { |
@@ -111,33 +111,33 @@ |
||
111 | 111 | } |
112 | 112 | |
113 | 113 | switch ($tokens[$i]['code']) { |
114 | - case T_DOUBLE_COLON: |
|
115 | - $usedName = strtolower($tokens[($i - 1)]['content']); |
|
116 | - if ($usedName === $systemName) { |
|
117 | - // The included system was used, so it is fine. |
|
118 | - return; |
|
119 | - } |
|
120 | - break; |
|
121 | - case T_EXTENDS: |
|
122 | - $classNameToken = $phpcsFile->findNext(T_STRING, ($i + 1)); |
|
123 | - $className = strtolower($tokens[$classNameToken]['content']); |
|
124 | - if ($className === $systemName) { |
|
125 | - // The included system was used, so it is fine. |
|
126 | - return; |
|
127 | - } |
|
128 | - break; |
|
129 | - case T_IMPLEMENTS: |
|
130 | - $endImplements = $phpcsFile->findNext(array(T_EXTENDS, T_OPEN_CURLY_BRACKET), ($i + 1)); |
|
131 | - for ($x = ($i + 1); $x < $endImplements; $x++) { |
|
132 | - if ($tokens[$x]['code'] === T_STRING) { |
|
133 | - $className = strtolower($tokens[$x]['content']); |
|
134 | - if ($className === $systemName) { |
|
135 | - // The included system was used, so it is fine. |
|
136 | - return; |
|
114 | + case T_DOUBLE_COLON: |
|
115 | + $usedName = strtolower($tokens[($i - 1)]['content']); |
|
116 | + if ($usedName === $systemName) { |
|
117 | + // The included system was used, so it is fine. |
|
118 | + return; |
|
119 | + } |
|
120 | + break; |
|
121 | + case T_EXTENDS: |
|
122 | + $classNameToken = $phpcsFile->findNext(T_STRING, ($i + 1)); |
|
123 | + $className = strtolower($tokens[$classNameToken]['content']); |
|
124 | + if ($className === $systemName) { |
|
125 | + // The included system was used, so it is fine. |
|
126 | + return; |
|
127 | + } |
|
128 | + break; |
|
129 | + case T_IMPLEMENTS: |
|
130 | + $endImplements = $phpcsFile->findNext(array(T_EXTENDS, T_OPEN_CURLY_BRACKET), ($i + 1)); |
|
131 | + for ($x = ($i + 1); $x < $endImplements; $x++) { |
|
132 | + if ($tokens[$x]['code'] === T_STRING) { |
|
133 | + $className = strtolower($tokens[$x]['content']); |
|
134 | + if ($className === $systemName) { |
|
135 | + // The included system was used, so it is fine. |
|
136 | + return; |
|
137 | + } |
|
137 | 138 | } |
138 | 139 | } |
139 | - } |
|
140 | - break; |
|
140 | + break; |
|
141 | 141 | }//end switch |
142 | 142 | }//end for |
143 | 143 |
@@ -106,9 +106,9 @@ discard block |
||
106 | 106 | } |
107 | 107 | |
108 | 108 | $foundCalls[$i] = array( |
109 | - 'name' => $funcName, |
|
110 | - 'type' => strtolower($tokens[$prevToken]['content']), |
|
111 | - ); |
|
109 | + 'name' => $funcName, |
|
110 | + 'type' => strtolower($tokens[$prevToken]['content']), |
|
111 | + ); |
|
112 | 112 | }//end for |
113 | 113 | |
114 | 114 | $errorClassName = substr($className, 0, -7); |
@@ -122,9 +122,9 @@ discard block |
||
122 | 122 | $type = $funcData['type']; |
123 | 123 | $error = "Static calls to public methods in Action classes must not use the $type keyword; use %s::%s() instead"; |
124 | 124 | $data = array( |
125 | - $errorClassName, |
|
126 | - $funcName, |
|
127 | - ); |
|
125 | + $errorClassName, |
|
126 | + $funcName, |
|
127 | + ); |
|
128 | 128 | $phpcsFile->addError($error, $token, 'Found'.ucfirst($funcData['type']), $data); |
129 | 129 | } |
130 | 130 | } |
@@ -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 |