@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | */ |
117 | 117 | protected function displayLinks(string $group, string $template): string |
118 | 118 | { |
119 | - if (! array_key_exists($template, $this->config->templates)) { |
|
119 | + if (!array_key_exists($template, $this->config->templates)) { |
|
120 | 120 | throw PagerException::forInvalidTemplate($template); |
121 | 121 | } |
122 | 122 | |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | { |
230 | 230 | $this->ensureGroup($group); |
231 | 231 | |
232 | - if (! is_numeric($this->groups[$group]['total']) || ! is_numeric($this->groups[$group]['perPage'])) { |
|
232 | + if (!is_numeric($this->groups[$group]['total']) || !is_numeric($this->groups[$group]['perPage'])) { |
|
233 | 233 | return null; |
234 | 234 | } |
235 | 235 | |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | if ($this->only) { |
273 | 273 | $query = array_intersect_key($_GET, array_flip($this->only)); |
274 | 274 | |
275 | - if (! $segment) { |
|
275 | + if (!$segment) { |
|
276 | 276 | $query[$this->groups[$group]['pageSelector']] = $page; |
277 | 277 | } |
278 | 278 | |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | $curr = $this->getCurrentPage($group); |
296 | 296 | $page = null; |
297 | 297 | |
298 | - if (! empty($last) && ! empty($curr) && $last === $curr) { |
|
298 | + if (!empty($last) && !empty($curr) && $last === $curr) { |
|
299 | 299 | return null; |
300 | 300 | } |
301 | 301 | |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | $curr = $this->getCurrentPage($group); |
320 | 320 | $page = null; |
321 | 321 | |
322 | - if (! empty($first) && ! empty($curr) && $first === $curr) { |
|
322 | + if (!empty($first) && !empty($curr) && $first === $curr) { |
|
323 | 323 | return null; |
324 | 324 | } |
325 | 325 | |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | */ |
349 | 349 | public function getDetails(string $group = 'default'): array |
350 | 350 | { |
351 | - if (! array_key_exists($group, $this->groups)) { |
|
351 | + if (!array_key_exists($group, $this->groups)) { |
|
352 | 352 | throw PagerException::forInvalidPaginationGroup($group); |
353 | 353 | } |
354 | 354 |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | } |
166 | 166 | |
167 | 167 | // No opening block level tag? Add it if needed. |
168 | - if (! preg_match('/^\s*<(?:' . $this->blockElements . ')/i', $str)) { |
|
168 | + if (!preg_match('/^\s*<(?:' . $this->blockElements . ')/i', $str)) { |
|
169 | 169 | $str = preg_replace('/^(.*?)<(' . $this->blockElements . ')/i', '<p>$1</p><$2', $str); |
170 | 170 | } |
171 | 171 | |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | { |
231 | 231 | static $table; |
232 | 232 | |
233 | - if (! isset($table)) { |
|
233 | + if (!isset($table)) { |
|
234 | 234 | $table = [ |
235 | 235 | // nested smart quotes, opening and closing |
236 | 236 | // note that rules for grammar (English) allow only for two levels deep |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | */ |
280 | 280 | protected function formatNewLines(string $str): string |
281 | 281 | { |
282 | - if ($str === '' || (strpos($str, "\n") === false && ! in_array($this->lastBlockElement, $this->innerBlockRequired, true))) { |
|
282 | + if ($str === '' || (strpos($str, "\n") === false && !in_array($this->lastBlockElement, $this->innerBlockRequired, true))) { |
|
283 | 283 | return $str; |
284 | 284 | } |
285 | 285 |
@@ -52,7 +52,7 @@ |
||
52 | 52 | try { |
53 | 53 | $security->verify($request); |
54 | 54 | } catch (SecurityException $e) { |
55 | - if ($security->shouldRedirect() && ! $request->isAJAX()) { |
|
55 | + if ($security->shouldRedirect() && !$request->isAJAX()) { |
|
56 | 56 | return redirect()->back()->with('error', $e->getMessage()); |
57 | 57 | } |
58 | 58 |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | foreach ($this->filtersClass[$position] as $className) { |
166 | 166 | $class = new $className(); |
167 | 167 | |
168 | - if (! $class instanceof FilterInterface) { |
|
168 | + if (!$class instanceof FilterInterface) { |
|
169 | 169 | throw FilterException::forIncorrectInterface(get_class($class)); |
170 | 170 | } |
171 | 171 | |
@@ -294,11 +294,11 @@ discard block |
||
294 | 294 | { |
295 | 295 | $alias = $alias ?? md5($class); |
296 | 296 | |
297 | - if (! isset($this->config->{$section})) { |
|
297 | + if (!isset($this->config->{$section})) { |
|
298 | 298 | $this->config->{$section} = []; |
299 | 299 | } |
300 | 300 | |
301 | - if (! isset($this->config->{$section}[$when])) { |
|
301 | + if (!isset($this->config->{$section}[$when])) { |
|
302 | 302 | $this->config->{$section}[$when] = []; |
303 | 303 | } |
304 | 304 | |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | [$name, $params] = explode(':', $name); |
328 | 328 | |
329 | 329 | $params = explode(',', $params); |
330 | - array_walk($params, static function (&$item) { |
|
330 | + array_walk($params, static function(&$item) { |
|
331 | 331 | $item = trim($item); |
332 | 332 | }); |
333 | 333 | |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | |
337 | 337 | if (class_exists($name)) { |
338 | 338 | $this->config->aliases[$name] = $name; |
339 | - } elseif (! array_key_exists($name, $this->config->aliases)) { |
|
339 | + } elseif (!array_key_exists($name, $this->config->aliases)) { |
|
340 | 340 | throw FilterException::forNoAlias($name); |
341 | 341 | } |
342 | 342 | |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | $this->argumentsClass[$className] = $this->arguments[$name] ?? null; |
347 | 347 | } |
348 | 348 | |
349 | - if (! isset($this->filters[$when][$name])) { |
|
349 | + if (!isset($this->filters[$when][$name])) { |
|
350 | 350 | $this->filters[$when][] = $name; |
351 | 351 | $this->filtersClass[$when] = array_merge($this->filtersClass[$when], $classNames); |
352 | 352 | } |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | */ |
394 | 394 | protected function processGlobals(?string $uri = null) |
395 | 395 | { |
396 | - if (! isset($this->config->globals) || ! is_array($this->config->globals)) { |
|
396 | + if (!isset($this->config->globals) || !is_array($this->config->globals)) { |
|
397 | 397 | return; |
398 | 398 | } |
399 | 399 | |
@@ -433,7 +433,7 @@ discard block |
||
433 | 433 | */ |
434 | 434 | protected function processMethods() |
435 | 435 | { |
436 | - if (! isset($this->config->methods) || ! is_array($this->config->methods)) { |
|
436 | + if (!isset($this->config->methods) || !is_array($this->config->methods)) { |
|
437 | 437 | return; |
438 | 438 | } |
439 | 439 | |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | */ |
453 | 453 | protected function processFilters(?string $uri = null) |
454 | 454 | { |
455 | - if (! isset($this->config->filters) || ! $this->config->filters) { |
|
455 | + if (!isset($this->config->filters) || !$this->config->filters) { |
|
456 | 456 | return; |
457 | 457 | } |
458 | 458 | |
@@ -489,7 +489,7 @@ discard block |
||
489 | 489 | $alias = $rules; |
490 | 490 | } |
491 | 491 | |
492 | - if (! array_key_exists($alias, $this->config->aliases)) { |
|
492 | + if (!array_key_exists($alias, $this->config->aliases)) { |
|
493 | 493 | throw FilterException::forNoAlias($alias); |
494 | 494 | } |
495 | 495 |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | { |
38 | 38 | $this->config = $config; |
39 | 39 | |
40 | - if (! $this->config->hidden) { |
|
40 | + if (!$this->config->hidden) { |
|
41 | 41 | throw HoneypotException::forNoHiddenValue(); |
42 | 42 | } |
43 | 43 | |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | */ |
60 | 60 | public function hasContent(RequestInterface $request) |
61 | 61 | { |
62 | - return ! empty($request->getPost($this->config->name)); |
|
62 | + return !empty($request->getPost($this->config->name)); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | /** |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | } |
144 | 144 | |
145 | 145 | $encoding = strtolower($encoding); |
146 | - if (! in_array($encoding, $this->supportedEncodings)) { |
|
146 | + if (!in_array($encoding, $this->supportedEncodings)) { |
|
147 | 147 | throw new Exception\InvalidArgumentException( |
148 | 148 | 'Value of \'' . $encoding . '\' passed to ' . static::class |
149 | 149 | . ' constructor parameter is invalid. Provide an encoding supported by htmlspecialchars()' |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | $result = $this->convertEncoding($string, 'UTF-8', $this->getEncoding()); |
357 | 357 | } |
358 | 358 | |
359 | - if (! $this->isUtf8($result)) { |
|
359 | + if (!$this->isUtf8($result)) { |
|
360 | 360 | throw new Exception\RuntimeException( |
361 | 361 | sprintf('String to be escaped was not valid UTF-8 or could not be converted: %s', $result) |
362 | 362 | ); |
@@ -60,5 +60,5 @@ |
||
60 | 60 | } |
61 | 61 | |
62 | 62 | if (!\defined('KINT_SKIP_HELPERS') || !KINT_SKIP_HELPERS) { |
63 | - require_once __DIR__.'/init_helpers.php'; |
|
63 | + require_once __DIR__ . '/init_helpers.php'; |
|
64 | 64 | } |
@@ -320,7 +320,7 @@ |
||
320 | 320 | $paramrealtokens = false; |
321 | 321 | $param_start = $offset + 1; |
322 | 322 | } elseif (T_CONSTANT_ENCAPSED_STRING === $token[0] && \strlen($token[1]) > 2) { |
323 | - $shortparam[] = $token[1][0].'...'.$token[1][0]; |
|
323 | + $shortparam[] = $token[1][0] . '...' . $token[1][0]; |
|
324 | 324 | } else { |
325 | 325 | $shortparam[] = $token; |
326 | 326 | } |
@@ -48,7 +48,7 @@ |
||
48 | 48 | public function getValueShort() |
49 | 49 | { |
50 | 50 | if (\strlen($this->message)) { |
51 | - return '"'.$this->message.'"'; |
|
51 | + return '"' . $this->message . '"'; |
|
52 | 52 | } |
53 | 53 | } |
54 | 54 | } |