@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | return null; |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | - if (! is_array($data)) { |
|
| 50 | + if (!is_array($data)) { |
|
| 51 | 51 | $data = (array) $data; |
| 52 | 52 | } |
| 53 | 53 | |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | foreach ($data as $record) { |
| 66 | 66 | // Si l'enregistrement n'est pas un tableau, alors break. |
| 67 | 67 | // C'est parce que le 2ème paramètre de fputcsv() doit être un tableau |
| 68 | - if (! is_array($record)) { |
|
| 68 | + if (!is_array($record)) { |
|
| 69 | 69 | break; |
| 70 | 70 | } |
| 71 | 71 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | $callback = Services::request()->getQuery('callback'); |
| 33 | 33 | |
| 34 | 34 | if (empty($callback)) { |
| 35 | - return json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); |
|
| 35 | + return json_encode($data, JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | // Nous n'honorons qu'un rappel jsonp qui sont des identifiants javascript valides |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | public function format($data) |
| 27 | 27 | { |
| 28 | - if (! is_array($data)) { |
|
| 28 | + if (!is_array($data)) { |
|
| 29 | 29 | $data = (array) $data; |
| 30 | 30 | } |
| 31 | 31 | |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | } |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | - if ($plugin || ! static::_classExistsInBase($fullname, 'BlitzPHP')) { |
|
| 72 | + if ($plugin || !static::_classExistsInBase($fullname, 'BlitzPHP')) { |
|
| 73 | 73 | return null; |
| 74 | 74 | } |
| 75 | 75 | |
@@ -122,7 +122,7 @@ |
||
| 122 | 122 | ->requireDirectory(APP_PATH, Checker::CHECK_IS_READABLE); |
| 123 | 123 | |
| 124 | 124 | $output = $checker->check(); |
| 125 | - if (! $checker->isSatisfied()) { |
|
| 125 | + if (!$checker->isSatisfied()) { |
|
| 126 | 126 | echo '<h3>An error encourred</h3>'; |
| 127 | 127 | |
| 128 | 128 | exit(implode('<br/> ', $checker->getErrors())); |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | |
| 81 | 81 | public function run(bool $return_response = false) |
| 82 | 82 | { |
| 83 | - return Services::singleton(Dispatcher::class)->run(null, $return_response); |
|
| 83 | + return Services::singleton(Dispatcher::class)->run(null, $return_response); |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | /** |
@@ -108,7 +108,7 @@ |
||
| 108 | 108 | */ |
| 109 | 109 | public function timelineData(): array |
| 110 | 110 | { |
| 111 | - if (! $this->hasTimeline) { |
|
| 111 | + if (!$this->hasTimeline) { |
|
| 112 | 112 | return []; |
| 113 | 113 | } |
| 114 | 114 | |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | */ |
| 78 | 78 | protected function collectLogs() |
| 79 | 79 | { |
| 80 | - if (! empty($this->data)) { |
|
| 80 | + if (!empty($this->data)) { |
|
| 81 | 81 | return $this->data; |
| 82 | 82 | } |
| 83 | 83 | |
@@ -90,7 +90,7 @@ |
||
| 90 | 90 | foreach (EventManager::getPerformanceLogs() as $row) { |
| 91 | 91 | $key = $row['event']; |
| 92 | 92 | |
| 93 | - if (! array_key_exists($key, $data['events'])) { |
|
| 93 | + if (!array_key_exists($key, $data['events'])) { |
|
| 94 | 94 | $data['events'][$key] = [ |
| 95 | 95 | 'event' => $key, |
| 96 | 96 | 'duration' => number_format(($row['end'] - $row['start']) * 1000, 2), |
@@ -172,11 +172,11 @@ discard block |
||
| 172 | 172 | |
| 173 | 173 | $authority = $this->host; |
| 174 | 174 | |
| 175 | - if (! empty($this->getUserInfo())) { |
|
| 175 | + if (!empty($this->getUserInfo())) { |
|
| 176 | 176 | $authority = $this->getUserInfo() . '@' . $authority; |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | - if (! empty($this->port) && ! $ignorePort) { |
|
| 179 | + if (!empty($this->port) && !$ignorePort) { |
|
| 180 | 180 | // N'ajoute pas de port s'il s'agit d'un port standard pour ce schéma |
| 181 | 181 | if ($this->port !== $this->defaultPorts[$this->scheme]) { |
| 182 | 182 | $authority .= ':' . $this->port; |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | { |
| 196 | 196 | $userInfo = $this->user; |
| 197 | 197 | |
| 198 | - if ($this->showPassword === true && ! empty($this->password)) { |
|
| 198 | + if ($this->showPassword === true && !empty($this->password)) { |
|
| 199 | 199 | $userInfo .= ':' . $this->password; |
| 200 | 200 | } |
| 201 | 201 | |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | $vars = $this->query; |
| 246 | 246 | |
| 247 | 247 | if (array_key_exists('except', $options)) { |
| 248 | - if (! is_array($options['except'])) { |
|
| 248 | + if (!is_array($options['except'])) { |
|
| 249 | 249 | $options['except'] = [$options['except']]; |
| 250 | 250 | } |
| 251 | 251 | |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | } elseif (array_key_exists('only', $options)) { |
| 256 | 256 | $temp = []; |
| 257 | 257 | |
| 258 | - if (! is_array($options['only'])) { |
|
| 258 | + if (!is_array($options['only'])) { |
|
| 259 | 259 | $options['only'] = [$options['only']]; |
| 260 | 260 | } |
| 261 | 261 | |
@@ -356,11 +356,11 @@ discard block |
||
| 356 | 356 | public static function createURIString(?string $scheme = null, ?string $authority = null, ?string $path = null, ?string $query = null, ?string $fragment = null): string |
| 357 | 357 | { |
| 358 | 358 | $uri = ''; |
| 359 | - if (! empty($scheme)) { |
|
| 359 | + if (!empty($scheme)) { |
|
| 360 | 360 | $uri .= $scheme . '://'; |
| 361 | 361 | } |
| 362 | 362 | |
| 363 | - if (! empty($authority)) { |
|
| 363 | + if (!empty($authority)) { |
|
| 364 | 364 | $uri .= $authority; |
| 365 | 365 | } |
| 366 | 366 | |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | { |
| 387 | 387 | $parts = parse_url($str); |
| 388 | 388 | |
| 389 | - if (empty($parts['host']) && ! empty($parts['path'])) { |
|
| 389 | + if (empty($parts['host']) && !empty($parts['path'])) { |
|
| 390 | 390 | $parts['host'] = $parts['path']; |
| 391 | 391 | unset($parts['path']); |
| 392 | 392 | } |
@@ -531,7 +531,7 @@ discard block |
||
| 531 | 531 | } |
| 532 | 532 | |
| 533 | 533 | // Ne peut pas avoir de début ? |
| 534 | - if (! empty($query) && strpos($query, '?') === 0) { |
|
| 534 | + if (!empty($query) && strpos($query, '?') === 0) { |
|
| 535 | 535 | $query = substr($query, 1); |
| 536 | 536 | } |
| 537 | 537 | |
@@ -596,7 +596,7 @@ discard block |
||
| 596 | 596 | $temp = []; |
| 597 | 597 | |
| 598 | 598 | foreach ($this->query as $key => $value) { |
| 599 | - if (! in_array($key, $params, true)) { |
|
| 599 | + if (!in_array($key, $params, true)) { |
|
| 600 | 600 | continue; |
| 601 | 601 | } |
| 602 | 602 | |
@@ -667,19 +667,19 @@ discard block |
||
| 667 | 667 | */ |
| 668 | 668 | protected function applyParts(array $parts) |
| 669 | 669 | { |
| 670 | - if (! empty($parts['host'])) { |
|
| 670 | + if (!empty($parts['host'])) { |
|
| 671 | 671 | $this->host = $parts['host']; |
| 672 | 672 | } |
| 673 | - if (! empty($parts['user'])) { |
|
| 673 | + if (!empty($parts['user'])) { |
|
| 674 | 674 | $this->user = $parts['user']; |
| 675 | 675 | } |
| 676 | - if (! empty($parts['path'])) { |
|
| 676 | + if (!empty($parts['path'])) { |
|
| 677 | 677 | $this->path = $this->filterPath($parts['path']); |
| 678 | 678 | } |
| 679 | - if (! empty($parts['query'])) { |
|
| 679 | + if (!empty($parts['query'])) { |
|
| 680 | 680 | $this->setQuery($parts['query']); |
| 681 | 681 | } |
| 682 | - if (! empty($parts['fragment'])) { |
|
| 682 | + if (!empty($parts['fragment'])) { |
|
| 683 | 683 | $this->fragment = $parts['fragment']; |
| 684 | 684 | } |
| 685 | 685 | |
@@ -701,7 +701,7 @@ discard block |
||
| 701 | 701 | $this->password = $parts['pass']; |
| 702 | 702 | } |
| 703 | 703 | |
| 704 | - if (! empty($parts['path'])) { |
|
| 704 | + if (!empty($parts['path'])) { |
|
| 705 | 705 | $this->segments = explode('/', trim($parts['path'], '/')); |
| 706 | 706 | } |
| 707 | 707 | } |
@@ -728,7 +728,7 @@ discard block |
||
| 728 | 728 | $transformed = clone $relative; |
| 729 | 729 | |
| 730 | 730 | // 5.2.2 Transformer les références dans une méthode non stricte (pas de schéma) |
| 731 | - if (! empty($relative->getAuthority())) { |
|
| 731 | + if (!empty($relative->getAuthority())) { |
|
| 732 | 732 | $transformed->setAuthority($relative->getAuthority()) |
| 733 | 733 | ->setPath($relative->getPath()) |
| 734 | 734 | ->setQuery($relative->getQuery()); |
@@ -768,7 +768,7 @@ discard block |
||
| 768 | 768 | */ |
| 769 | 769 | protected function mergePaths(self $base, self $reference): string |
| 770 | 770 | { |
| 771 | - if (! empty($base->getAuthority()) && empty($base->getPath())) { |
|
| 771 | + if (!empty($base->getAuthority()) && empty($base->getPath())) { |
|
| 772 | 772 | return '/' . ltrim($reference->getPath(), '/ '); |
| 773 | 773 | } |
| 774 | 774 | |