@@ -21,6 +21,6 @@ |
||
21 | 21 | return $config = array( |
22 | 22 | 'tags' => array(), // Tags to be filtered out |
23 | 23 | 'patterns' => array( // patterns to be used for filtering |
24 | - array( |
|
25 | - 'search' => '', |
|
26 | - 'replace' => ''))); |
|
24 | + array( |
|
25 | + 'search' => '', |
|
26 | + 'replace' => ''))); |
@@ -19,7 +19,7 @@ |
||
19 | 19 | defined('XOOPS_ROOT_PATH') || exit('Restricted access'); |
20 | 20 | |
21 | 21 | return $config = array( |
22 | - 'tags' => array(), // Tags to be filtered out |
|
22 | + 'tags' => array(), // Tags to be filtered out |
|
23 | 23 | 'patterns' => array( // patterns to be used for filtering |
24 | 24 | array( |
25 | 25 | 'search' => '', |
@@ -73,8 +73,8 @@ |
||
73 | 73 | $tags[] = 'VBSCRIPT'; |
74 | 74 | $tags[] = 'JAVASCRIPT'; |
75 | 75 | foreach ($tags as $tag) { |
76 | - $search[] = '/<' . $tag . "[^>]*?>.*?<\/" . $tag . '>/si'; |
|
77 | - $replace[] = ' [!' . strtoupper($tag) . ' FILTERED!] '; |
|
76 | + $search[] = '/<'.$tag."[^>]*?>.*?<\/".$tag.'>/si'; |
|
77 | + $replace[] = ' [!'.strtoupper($tag).' FILTERED!] '; |
|
78 | 78 | } |
79 | 79 | // Set meta refresh tag |
80 | 80 | $search[] = "/<META[^>\/]*HTTP-EQUIV=(['\"])?REFRESH(\\1)[^>\/]*?\/>/si"; |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | |
195 | 195 | public static function integerish($value, $message = '') |
196 | 196 | { |
197 | - if (!is_numeric($value) || $value != (int) $value) { |
|
197 | + if (!is_numeric($value) || $value != (int)$value) { |
|
198 | 198 | static::reportInvalidArgument(sprintf( |
199 | 199 | $message ?: 'Expected an integerish value. Got: %s', |
200 | 200 | static::typeToString($value) |
@@ -1055,7 +1055,7 @@ discard block |
||
1055 | 1055 | return '"'.$value.'"'; |
1056 | 1056 | } |
1057 | 1057 | |
1058 | - return (string) $value; |
|
1058 | + return (string)$value; |
|
1059 | 1059 | } |
1060 | 1060 | |
1061 | 1061 | protected static function typeToString($value) |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | // token can actually be used. If it's not yet that time, abort. |
117 | 117 | if (isset($payload->nbf) && $payload->nbf > ($timestamp + static::$leeway)) { |
118 | 118 | throw new BeforeValidException( |
119 | - 'Cannot handle token prior to ' . date(DateTime::ISO8601, $payload->nbf) |
|
119 | + 'Cannot handle token prior to '.date(DateTime::ISO8601, $payload->nbf) |
|
120 | 120 | ); |
121 | 121 | } |
122 | 122 | |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | // correctly used the nbf claim). |
126 | 126 | if (isset($payload->iat) && $payload->iat > ($timestamp + static::$leeway)) { |
127 | 127 | throw new BeforeValidException( |
128 | - 'Cannot handle token prior to ' . date(DateTime::ISO8601, $payload->iat) |
|
128 | + 'Cannot handle token prior to '.date(DateTime::ISO8601, $payload->iat) |
|
129 | 129 | ); |
130 | 130 | } |
131 | 131 | |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | if ($keyId !== null) { |
160 | 160 | $header['kid'] = $keyId; |
161 | 161 | } |
162 | - if ( isset($head) && is_array($head) ) { |
|
162 | + if (isset($head) && is_array($head)) { |
|
163 | 163 | $header = array_merge($head, $header); |
164 | 164 | } |
165 | 165 | $segments = array(); |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | throw new DomainException('Algorithm not supported'); |
192 | 192 | } |
193 | 193 | list($function, $algorithm) = static::$supported_algs[$alg]; |
194 | - switch($function) { |
|
194 | + switch ($function) { |
|
195 | 195 | case 'hash_hmac': |
196 | 196 | return hash_hmac($algorithm, $msg, $key, true); |
197 | 197 | case 'openssl': |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | } |
226 | 226 | |
227 | 227 | list($function, $algorithm) = static::$supported_algs[$alg]; |
228 | - switch($function) { |
|
228 | + switch ($function) { |
|
229 | 229 | case 'openssl': |
230 | 230 | $success = openssl_verify($msg, $signature, $key, $algorithm); |
231 | 231 | if ($success === 1) { |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | } |
236 | 236 | // returns 1 on success, 0 on failure, -1 on error. |
237 | 237 | throw new DomainException( |
238 | - 'OpenSSL error: ' . openssl_error_string() |
|
238 | + 'OpenSSL error: '.openssl_error_string() |
|
239 | 239 | ); |
240 | 240 | case 'hash_hmac': |
241 | 241 | default: |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | * manually detect large ints in the JSON string and quote them (thus converting |
278 | 278 | *them to strings) before decoding, hence the preg_replace() call. |
279 | 279 | */ |
280 | - $max_int_length = strlen((string) PHP_INT_MAX) - 1; |
|
280 | + $max_int_length = strlen((string)PHP_INT_MAX) - 1; |
|
281 | 281 | $json_without_bigints = preg_replace('/:\s*(-?\d{'.$max_int_length.',})/', ': "$1"', $input); |
282 | 282 | $obj = json_decode($json_without_bigints); |
283 | 283 | } |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | throw new DomainException( |
359 | 359 | isset($messages[$errno]) |
360 | 360 | ? $messages[$errno] |
361 | - : 'Unknown JSON error: ' . $errno |
|
361 | + : 'Unknown JSON error: '.$errno |
|
362 | 362 | ); |
363 | 363 | } |
364 | 364 |
@@ -37,7 +37,7 @@ |
||
37 | 37 | if (KINT_PHP70) { |
38 | 38 | $this->returntype = $method->getReturnType(); |
39 | 39 | if ($this->returntype) { |
40 | - $this->returntype = (string) $this->returntype; |
|
40 | + $this->returntype = (string)$this->returntype; |
|
41 | 41 | } |
42 | 42 | } |
43 | 43 |
@@ -21,7 +21,7 @@ |
||
21 | 21 | { |
22 | 22 | if (method_exists('ReflectionParameter', 'getType')) { |
23 | 23 | if ($type = $param->getType()) { |
24 | - $this->type_hint = (string) $type; |
|
24 | + $this->type_hint = (string)$type; |
|
25 | 25 | } |
26 | 26 | } else { |
27 | 27 | if ($param->isArray()) { |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | $child->operator = Kint_Object::OPERATOR_ARRAY; |
152 | 152 | |
153 | 153 | if ($array->access_path !== null) { |
154 | - if (is_string($key) && (string) (int) $key === $key) { |
|
154 | + if (is_string($key) && (string)(int)$key === $key) { |
|
155 | 155 | $child->access_path = 'array_values('.$array->access_path.')['.$i.']'; |
156 | 156 | } else { |
157 | 157 | $child->access_path = $array->access_path.'['.var_export($key, true).']'; |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | $hash = $match[1]; |
194 | 194 | } |
195 | 195 | |
196 | - $values = (array) $var; |
|
196 | + $values = (array)$var; |
|
197 | 197 | |
198 | 198 | $object = $o->transplant(new Kint_Object_Instance()); |
199 | 199 | $object->classname = get_class($var); |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | $child->owner_class = $split_key[1]; |
271 | 271 | } |
272 | 272 | } elseif (KINT_PHP72) { |
273 | - $child->name = (string) $key; |
|
273 | + $child->name = (string)$key; |
|
274 | 274 | } else { |
275 | 275 | $child->name = $key; |
276 | 276 | } |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | } elseif (preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $child->name)) { |
284 | 284 | $child->access_path .= '->'.$child->name; |
285 | 285 | } else { |
286 | - $child->access_path .= '->{'.var_export((string) $child->name, true).'}'; |
|
286 | + $child->access_path .= '->{'.var_export((string)$child->name, true).'}'; |
|
287 | 287 | } |
288 | 288 | } |
289 | 289 |
@@ -62,7 +62,7 @@ |
||
62 | 62 | |
63 | 63 | private static function sort(Kint_Object_Method $a, Kint_Object_Method $b) |
64 | 64 | { |
65 | - $sort = ((int) $a->static) - ((int) $b->static); |
|
65 | + $sort = ((int)$a->static) - ((int)$b->static); |
|
66 | 66 | if ($sort) { |
67 | 67 | return $sort; |
68 | 68 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | return; |
27 | 27 | } |
28 | 28 | |
29 | - $json = (array) $json; |
|
29 | + $json = (array)$json; |
|
30 | 30 | if (empty($json)) { |
31 | 31 | return; |
32 | 32 | } |