@@ -69,7 +69,7 @@ |
||
| 69 | 69 | { |
| 70 | 70 | $this->invalidate(); |
| 71 | 71 | |
| 72 | - if ($overwrite || ! isset($this->configSchemas[$key])) { |
|
| 72 | + if ($overwrite || !isset($this->configSchemas[$key])) { |
|
| 73 | 73 | $this->configSchemas[$key] = $schema; |
| 74 | 74 | } |
| 75 | 75 | } |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | public function start(string $name, ?float $time = null): self |
| 35 | 35 | { |
| 36 | 36 | $this->timers[strtolower($name)] = [ |
| 37 | - 'start' => ! empty($time) ? $time : microtime(true), |
|
| 37 | + 'start' => !empty($time) ? $time : microtime(true), |
|
| 38 | 38 | 'end' => null, |
| 39 | 39 | ]; |
| 40 | 40 | |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | } |
| 112 | 112 | $body = $response->getBody(); |
| 113 | 113 | |
| 114 | - if (! $body->isSeekable()) { |
|
| 114 | + if (!$body->isSeekable()) { |
|
| 115 | 115 | echo $body; |
| 116 | 116 | |
| 117 | 117 | return; |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | |
| 120 | 120 | $body->rewind(); |
| 121 | 121 | |
| 122 | - while (! $body->eof()) { |
|
| 122 | + while (!$body->eof()) { |
|
| 123 | 123 | echo $body->read($maxBufferLength); |
| 124 | 124 | } |
| 125 | 125 | } |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | |
| 139 | 139 | $body = $response->getBody(); |
| 140 | 140 | |
| 141 | - if (! $body->isSeekable()) { |
|
| 141 | + if (!$body->isSeekable()) { |
|
| 142 | 142 | $contents = $body->getContents(); |
| 143 | 143 | echo substr($contents, $first, $last - $first + 1); |
| 144 | 144 | |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | $pos = 0; |
| 151 | 151 | $length = $last - $first + 1; |
| 152 | 152 | |
| 153 | - while (! $body->eof() && $pos < $length) { |
|
| 153 | + while (!$body->eof() && $pos < $length) { |
|
| 154 | 154 | if (($pos + $maxBufferLength) > $length) { |
| 155 | 155 | echo $body->read($length - $pos); |
| 156 | 156 | break; |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | $key = strtolower($key); |
| 234 | 234 | $data[$key] = $value; |
| 235 | 235 | } |
| 236 | - if (! empty($data['expires'])) { |
|
| 236 | + if (!empty($data['expires'])) { |
|
| 237 | 237 | $data['expires'] = strtotime($data['expires']); |
| 238 | 238 | } |
| 239 | 239 | setcookie( |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | |
| 70 | 70 | $auto_refresh = $this->config['auto_refresh'] ?? 'auto'; |
| 71 | 71 | if ($auto_refresh === 'auto') { |
| 72 | - $auto_refresh = ! is_online(); |
|
| 72 | + $auto_refresh = !is_online(); |
|
| 73 | 73 | } |
| 74 | 74 | $this->latte->setAutoRefresh($auto_refresh); |
| 75 | 75 | |
@@ -53,19 +53,19 @@ |
||
| 53 | 53 | */ |
| 54 | 54 | public static function type(string $mime): FormatterInterface |
| 55 | 55 | { |
| 56 | - if (! array_key_exists($mime, self::$formatters)) { |
|
| 56 | + if (!array_key_exists($mime, self::$formatters)) { |
|
| 57 | 57 | throw FormatException::invalidMime($mime); |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | $className = self::$formatters[$mime]; |
| 61 | 61 | |
| 62 | - if (! class_exists($className)) { |
|
| 62 | + if (!class_exists($className)) { |
|
| 63 | 63 | throw FormatException::invalidFormatter($className); |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | $class = new $className(); |
| 67 | 67 | |
| 68 | - if (! $class instanceof FormatterInterface) { |
|
| 68 | + if (!$class instanceof FormatterInterface) { |
|
| 69 | 69 | throw FormatException::invalidFormatter($className); |
| 70 | 70 | } |
| 71 | 71 | |
@@ -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 | |
@@ -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 | |
@@ -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 | |
@@ -152,19 +152,19 @@ |
||
| 152 | 152 | */ |
| 153 | 153 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
| 154 | 154 | { |
| 155 | - if (! in_array($request->getMethod(), $this->methods, true)) { |
|
| 155 | + if (!in_array($request->getMethod(), $this->methods, true)) { |
|
| 156 | 156 | return $handler->handle($request); |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | [$type] = explode(';', $request->getHeaderLine('Content-Type')); |
| 160 | 160 | $type = strtolower($type); |
| 161 | - if (! isset($this->parsers[$type])) { |
|
| 161 | + if (!isset($this->parsers[$type])) { |
|
| 162 | 162 | return $handler->handle($request); |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | $parser = $this->parsers[$type]; |
| 166 | 166 | $result = $parser($request->getBody()->getContents()); |
| 167 | - if (! is_array($result)) { |
|
| 167 | + if (!is_array($result)) { |
|
| 168 | 168 | throw HttpException::badRequest(); |
| 169 | 169 | } |
| 170 | 170 | $request = $request->withParsedBody($result); |