Test Failed
Pull Request — main (#17)
by Dimitri
16:16 queued 22s
created
src/Middlewares/PerformanceMetrics.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     {
27 27
         $response = $handler->handle($request);
28 28
 
29
-        if (! empty($body = $response->getBody()->getContents())) {
29
+        if (!empty($body = $response->getBody()->getContents())) {
30 30
             $benchmark = Services::timer();
31 31
 
32 32
             $output = str_replace(
Please login to merge, or discard this patch.
src/Middlewares/PageCache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
         $response = $handler->handle($request);
38 38
         $content  = $response->getBody()->getContents();
39 39
 
40
-        if (! $response instanceof Redirection) {
40
+        if (!$response instanceof Redirection) {
41 41
             // Mettez-le en cache sans remplacer les mesures de performances afin que nous puissions avoir des mises à jour de vitesse en direct en cours de route.
42 42
             // Doit être exécuté après les filtres pour conserver les en-têtes de réponse.
43 43
             $this->pageCache->make($request, $response->withBody(to_stream($content)));
Please login to merge, or discard this patch.
src/Http/Concerns/ResponseTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
      */
167 167
     public function download(SplFileInfo|string $file, ?string $name = null, array $headers = []): static
168 168
     {
169
-        if (is_string($file) && ! is_file($file)) {
169
+        if (is_string($file) && !is_file($file)) {
170 170
             throw new LoadException('The requested file was not found');
171 171
         }
172 172
 
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
      */
179 179
     public function streamDownload(callable|StreamInterface|string $stream, string $name, array $headers = []): static
180 180
     {
181
-        if (! ($stream instanceof StreamInterface)) {
181
+        if (!($stream instanceof StreamInterface)) {
182 182
             $stream = to_stream($stream);
183 183
         }
184 184
 
Please login to merge, or discard this patch.
src/View/Adapters/SmartyAdapter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
         $this->renderVars['file'] = $this->getRenderedFile($options, $this->renderVars['view'], $this->ext);
67 67
 
68
-        if (! empty($layout = $this->layout)) {
68
+        if (!empty($layout = $this->layout)) {
69 69
             if (empty(pathinfo($layout, PATHINFO_EXTENSION))) {
70 70
                 $layout .= '.' . $this->ext;
71 71
             }
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         $this->engine->assign($this->data);
76 76
 
77 77
         // Doit-on mettre en cache?
78
-        if (! empty($this->renderVars['options']['cache_name']) || ! empty($this->renderVars['options']['cache'])) {
78
+        if (!empty($this->renderVars['options']['cache_name']) || !empty($this->renderVars['options']['cache'])) {
79 79
             $this->enableCache();
80 80
             $this->engine->setCacheLifetime(60 * ($this->renderVars['options']['cache'] ?? 60));
81 81
             $this->engine->setCompileId($this->renderVars['options']['cache_name'] ?? null);
Please login to merge, or discard this patch.
src/View/ViewDecoratorTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
     protected function decorate(string $output): string
22 22
     {
23 23
         foreach (config('view.decorators') as $decorator) {
24
-            if (! is_subclass_of($decorator, ViewDecoratorInterface::class, true)) {
24
+            if (!is_subclass_of($decorator, ViewDecoratorInterface::class, true)) {
25 25
                 throw ViewException::invalidDecorator($decorator);
26 26
             }
27 27
 
Please login to merge, or discard this patch.
src/View/View.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 
216 216
         $data = array_merge(self::$shared, $data);
217 217
 
218
-        if (! on_test() && ! isset($data['errors'])) {
218
+        if (!on_test() && !isset($data['errors'])) {
219 219
             $data['errors'] = $this->setValidationErrors();
220 220
         }
221 221
 
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
         if (is_string($errors)) {
247 247
             $errors = ['default' => $errors];
248 248
         }
249
-        if (! ($errors instanceof ErrorBag)) {
249
+        if (!($errors instanceof ErrorBag)) {
250 250
             $errors = new ErrorBag($errors);
251 251
         }
252 252
 
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
 
285 285
         $data = array_merge(self::$shared, $data);
286 286
 
287
-        if (! on_test() && ! isset($data['errors'])) {
287
+        if (!on_test() && !isset($data['errors'])) {
288 288
             $data['errors'] = $this->setValidationErrors();
289 289
         }
290 290
 
@@ -342,10 +342,10 @@  discard block
 block discarded – undo
342 342
      */
343 343
     public function setAdapter(string $adapter, array $config = []): static
344 344
     {
345
-        if (! array_key_exists($adapter, self::$validAdapters)) {
345
+        if (!array_key_exists($adapter, self::$validAdapters)) {
346 346
             $adapter = 'native';
347 347
         }
348
-        if (empty($this->config['adapters']) || ! is_array($this->config['adapters'])) {
348
+        if (empty($this->config['adapters']) || !is_array($this->config['adapters'])) {
349 349
             $this->config['adapters'] = [];
350 350
         }
351 351
 
Please login to merge, or discard this patch.
src/Http/UrlGenerator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
 
271 271
         $route = $this->routes->reverseRoute($action, ...$parameters);
272 272
 
273
-        if (! $route) {
273
+        if (!$route) {
274 274
             throw RouterException::actionNotDefined($action);
275 275
         }
276 276
 
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
      */
342 342
     public function isValidUrl(string $path): bool
343 343
     {
344
-        if (! preg_match('~^(#|//|https?://|(mailto|tel|sms):)~', $path)) {
344
+        if (!preg_match('~^(#|//|https?://|(mailto|tel|sms):)~', $path)) {
345 345
             return filter_var($path, FILTER_VALIDATE_URL) !== false;
346 346
         }
347 347
 
Please login to merge, or discard this patch.
src/Middlewares/BaseMiddleware.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
         $this->path = $path;
36 36
 
37 37
         foreach ($this->arguments as $argument => $value) {
38
-            if (! is_string($argument)) {
38
+            if (!is_string($argument)) {
39 39
                 continue;
40 40
             }
41 41
 
Please login to merge, or discard this patch.
src/Http/UploadedFileFactory.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public static function makeUploadedFile(array $spec): UploadedFile
65 65
     {
66
-        if (! isset($spec['tmp_name']) || ! isset($spec['size']) || ! isset($spec['error'])) {
66
+        if (!isset($spec['tmp_name']) || !isset($spec['size']) || !isset($spec['error'])) {
67 67
             throw new InvalidArgumentException(sprintf(
68 68
                 '$spec fourni à %s DOIT contenir chacune des clés "tmp_name", "size", et "error" ; une ou plusieurs étaient manquantes',
69 69
                 __FUNCTION__
@@ -103,13 +103,13 @@  discard block
 block discarded – undo
103 103
          *
104 104
          * @return array[]|UploadedFile[]
105 105
          */
106
-        $recursiveNormalize = static function (
106
+        $recursiveNormalize = static function(
107 107
             array $tmpNameTree,
108 108
             array $sizeTree,
109 109
             array $errorTree,
110 110
             ?array $nameTree = null,
111 111
             ?array $typeTree = null
112
-        ) use (&$recursiveNormalize): array {
112
+        ) use (&$recursiveNormalize) : array {
113 113
             $normalized = [];
114 114
 
115 115
             foreach ($tmpNameTree as $key => $value) {
@@ -147,11 +147,11 @@  discard block
 block discarded – undo
147 147
          *
148 148
          * @return UploadedFile[]
149 149
          */
150
-        $normalizeUploadedFileSpecification = static function (array $files = []) use (&$recursiveNormalize): array {
150
+        $normalizeUploadedFileSpecification = static function(array $files = []) use (&$recursiveNormalize): array {
151 151
             if (
152
-                ! isset($files['tmp_name']) || ! is_array($files['tmp_name'])
153
-                                            || ! isset($files['size']) || ! is_array($files['size'])
154
-                                            || ! isset($files['error']) || ! is_array($files['error'])
152
+                !isset($files['tmp_name']) || !is_array($files['tmp_name'])
153
+                                            || !isset($files['size']) || !is_array($files['size'])
154
+                                            || !isset($files['error']) || !is_array($files['error'])
155 155
             ) {
156 156
                 throw new InvalidArgumentException(sprintf(
157 157
                     'Les fichiers fournis à %s DOIVENT contenir chacune des clés "tmp_name", "size" et "error",
Please login to merge, or discard this patch.