@@ -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) { |
@@ -163,9 +163,9 @@ discard block |
||
163 | 163 | if (substr($varName, 0, 1) === '_') { |
164 | 164 | $error = '%s member variable "%s" must not contain a leading underscore'; |
165 | 165 | $data = array( |
166 | - ucfirst($memberProps['scope']), |
|
167 | - $errorData[0], |
|
168 | - ); |
|
166 | + ucfirst($memberProps['scope']), |
|
167 | + $errorData[0], |
|
168 | + ); |
|
169 | 169 | $phpcsFile->addError($error, $stackPtr, 'PublicHasUnderscore', $data); |
170 | 170 | return; |
171 | 171 | } |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | 'http_response_header', |
212 | 212 | 'HTTP_RAW_POST_DATA', |
213 | 213 | 'php_errormsg', |
214 | - ); |
|
214 | + ); |
|
215 | 215 | |
216 | 216 | if (preg_match_all('|[^\\\]\${?([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)|', $tokens[$stackPtr]['content'], $matches) !== 0) { |
217 | 217 | foreach ($matches[1] as $varName) { |
@@ -34,9 +34,9 @@ |
||
34 | 34 | * @var array |
35 | 35 | */ |
36 | 36 | public $supportedTokenizers = array( |
37 | - 'PHP', |
|
38 | - 'JS', |
|
39 | - ); |
|
37 | + 'PHP', |
|
38 | + 'JS', |
|
39 | + ); |
|
40 | 40 | |
41 | 41 | |
42 | 42 | /** |
@@ -124,9 +124,9 @@ |
||
124 | 124 | if ($content !== strtolower($content)) { |
125 | 125 | $error = 'Calls to inbuilt PHP functions must be lowercase; expected "%s" but found "%s"'; |
126 | 126 | $data = array( |
127 | - strtolower($content), |
|
128 | - $content, |
|
129 | - ); |
|
127 | + strtolower($content), |
|
128 | + $content, |
|
129 | + ); |
|
130 | 130 | |
131 | 131 | $fix = $phpcsFile->addFixableError($error, $stackPtr, 'CallUppercase', $data); |
132 | 132 | if ($fix === true) { |
@@ -41,10 +41,10 @@ |
||
41 | 41 | * @var array(string => string|null) |
42 | 42 | */ |
43 | 43 | public $forbiddenFunctions = array( |
44 | - 'error_log' => null, |
|
45 | - 'print_r' => null, |
|
46 | - 'var_dump' => null, |
|
47 | - ); |
|
44 | + 'error_log' => null, |
|
45 | + 'print_r' => null, |
|
46 | + 'var_dump' => null, |
|
47 | + ); |
|
48 | 48 | |
49 | 49 | /** |
50 | 50 | * If true, an error will be thrown; otherwise a warning. |
@@ -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 |
@@ -44,11 +44,11 @@ |
||
44 | 44 | * @var array(string => string|null) |
45 | 45 | */ |
46 | 46 | public $forbiddenFunctions = array( |
47 | - 'sizeof' => 'count', |
|
48 | - 'delete' => 'unset', |
|
49 | - 'print' => 'echo', |
|
50 | - 'is_null' => null, |
|
51 | - 'create_function' => null, |
|
52 | - ); |
|
47 | + 'sizeof' => 'count', |
|
48 | + 'delete' => 'unset', |
|
49 | + 'print' => 'echo', |
|
50 | + 'is_null' => null, |
|
51 | + 'create_function' => null, |
|
52 | + ); |
|
53 | 53 | |
54 | 54 | }//end class |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | T_RETURN, |
46 | 46 | T_THROW, |
47 | 47 | T_EXIT, |
48 | - ); |
|
48 | + ); |
|
49 | 49 | |
50 | 50 | }//end register() |
51 | 51 | |
@@ -116,9 +116,9 @@ discard block |
||
116 | 116 | $end = $phpcsFile->findEndOfStatement($stackPtr); |
117 | 117 | $next = $phpcsFile->findNext( |
118 | 118 | array( |
119 | - T_CASE, |
|
120 | - T_DEFAULT, |
|
121 | - T_CLOSE_CURLY_BRACKET, |
|
119 | + T_CASE, |
|
120 | + T_DEFAULT, |
|
121 | + T_CLOSE_CURLY_BRACKET, |
|
122 | 122 | ), |
123 | 123 | ($end + 1) |
124 | 124 | ); |
@@ -153,10 +153,10 @@ discard block |
||
153 | 153 | if (isset($tokens[$prev]['parenthesis_owner']) === true) { |
154 | 154 | $owner = $tokens[$prev]['parenthesis_owner']; |
155 | 155 | $ignore = array( |
156 | - T_IF => true, |
|
157 | - T_ELSE => true, |
|
158 | - T_ELSEIF => true, |
|
159 | - ); |
|
156 | + T_IF => true, |
|
157 | + T_ELSE => true, |
|
158 | + T_ELSEIF => true, |
|
159 | + ); |
|
160 | 160 | if (isset($ignore[$tokens[$owner]['code']]) === true) { |
161 | 161 | return; |
162 | 162 | } |
@@ -80,10 +80,10 @@ |
||
80 | 80 | |
81 | 81 | // Ignore function calls. |
82 | 82 | $ignore = array( |
83 | - T_STRING, |
|
84 | - T_WHITESPACE, |
|
85 | - T_OBJECT_OPERATOR, |
|
86 | - ); |
|
83 | + T_STRING, |
|
84 | + T_WHITESPACE, |
|
85 | + T_OBJECT_OPERATOR, |
|
86 | + ); |
|
87 | 87 | |
88 | 88 | $next = $phpcsFile->findNext($ignore, ($stackPtr + 1), null, true); |
89 | 89 | if ($tokens[$next]['code'] === T_OPEN_PARENTHESIS |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | return array( |
42 | 42 | T_CONSTANT_ENCAPSED_STRING, |
43 | 43 | T_DOUBLE_QUOTED_STRING, |
44 | - ); |
|
44 | + ); |
|
45 | 45 | |
46 | 46 | }//end register() |
47 | 47 | |
@@ -102,24 +102,24 @@ discard block |
||
102 | 102 | }//end if |
103 | 103 | |
104 | 104 | $allowedChars = array( |
105 | - '\0', |
|
106 | - '\1', |
|
107 | - '\2', |
|
108 | - '\3', |
|
109 | - '\4', |
|
110 | - '\5', |
|
111 | - '\6', |
|
112 | - '\7', |
|
113 | - '\n', |
|
114 | - '\r', |
|
115 | - '\f', |
|
116 | - '\t', |
|
117 | - '\v', |
|
118 | - '\x', |
|
119 | - '\b', |
|
120 | - '\e', |
|
121 | - '\u', |
|
122 | - '\'', |
|
105 | + '\0', |
|
106 | + '\1', |
|
107 | + '\2', |
|
108 | + '\3', |
|
109 | + '\4', |
|
110 | + '\5', |
|
111 | + '\6', |
|
112 | + '\7', |
|
113 | + '\n', |
|
114 | + '\r', |
|
115 | + '\f', |
|
116 | + '\t', |
|
117 | + '\v', |
|
118 | + '\x', |
|
119 | + '\b', |
|
120 | + '\e', |
|
121 | + '\u', |
|
122 | + '\'', |
|
123 | 123 | ); |
124 | 124 | |
125 | 125 | foreach ($allowedChars as $testChar) { |