Passed
Push — main ( 5ed6ff...c7b99b )
by Dimitri
28:04
created
src/Controllers/BaseController.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@
 block discarded – undo
120 120
      */
121 121
     protected function validateData(array $data, array $rules, array $messages = []): ValidatedInput
122 122
     {
123
-		try {
123
+        try {
124 124
             return Validator::make($data, $rules, $messages)->safe();
125 125
         } catch (DimtrovichValidationException $e) {
126 126
             $th = new ValidationException($e->getMessage());
Please login to merge, or discard this patch.
src/Router/RouteCollection.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1184,7 +1184,7 @@
 block discarded – undo
1184 1184
             return false;
1185 1185
         }
1186 1186
 
1187
-		$name = $this->formatRouteName($search);
1187
+        $name = $this->formatRouteName($search);
1188 1188
         // Les routes nommées ont une priorité plus élevée.
1189 1189
         foreach ($this->routesNames as $verb => $collection) {
1190 1190
             if (array_key_exists($name, $collection)) {
Please login to merge, or discard this patch.
src/View/View.php 2 patches
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -177,27 +177,27 @@
 block discarded – undo
177 177
         return $this->addData($key, $context);
178 178
     }
179 179
 
180
-	/**
180
+    /**
181 181
      * Ajoute des erreurs à la session en tant que Flashdata.
182 182
      */
183 183
     public function withErrors(array|ErrorBag|string $errors): static
184 184
     {
185
-		if (is_string($errors)) {
186
-			$errors = ['default' => $errors];
187
-		}
188
-		if (! ($errors instanceof ErrorBag)) {
189
-			$errors = new ErrorBag($errors);
190
-		}
191
-
192
-		if (isset(static::$shared['errors']) && static::$shared['errors'] instanceof ErrorBag) {
193
-			$messages = array_merge(
194
-				static::$shared['errors']->toArray(),
195
-				$errors->toArray()
196
-			);
197
-			$errors = new ErrorBag($messages);
198
-		}
199
-
200
-		$this->share('errors', $errors);
185
+        if (is_string($errors)) {
186
+            $errors = ['default' => $errors];
187
+        }
188
+        if (! ($errors instanceof ErrorBag)) {
189
+            $errors = new ErrorBag($errors);
190
+        }
191
+
192
+        if (isset(static::$shared['errors']) && static::$shared['errors'] instanceof ErrorBag) {
193
+            $messages = array_merge(
194
+                static::$shared['errors']->toArray(),
195
+                $errors->toArray()
196
+            );
197
+            $errors = new ErrorBag($messages);
198
+        }
199
+
200
+        $this->share('errors', $errors);
201 201
 
202 202
         return $this;
203 203
     }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 
157 157
         $this->adapter->addData($data, $context);
158 158
 
159
-        if (! array_key_exists('errors', $this->getData())) {
159
+        if (!array_key_exists('errors', $this->getData())) {
160 160
             $this->setValidationErrors();
161 161
         }
162 162
 
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 		if (is_string($errors)) {
186 186
 			$errors = ['default' => $errors];
187 187
 		}
188
-		if (! ($errors instanceof ErrorBag)) {
188
+		if (!($errors instanceof ErrorBag)) {
189 189
 			$errors = new ErrorBag($errors);
190 190
 		}
191 191
 
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 
226 226
         $this->adapter->setData($data, $context);
227 227
 
228
-        if (! array_key_exists('errors', $this->getData())) {
228
+        if (!array_key_exists('errors', $this->getData())) {
229 229
             $this->setValidationErrors();
230 230
         }
231 231
 
@@ -265,10 +265,10 @@  discard block
 block discarded – undo
265 265
      */
266 266
     public function setAdapter(string $adapter, array $config = []): self
267 267
     {
268
-        if (! array_key_exists($adapter, self::$validAdapters)) {
268
+        if (!array_key_exists($adapter, self::$validAdapters)) {
269 269
             $adapter = 'native';
270 270
         }
271
-        if (empty($this->config['adapters']) || ! is_array($this->config['adapters'])) {
271
+        if (empty($this->config['adapters']) || !is_array($this->config['adapters'])) {
272 272
             $this->config['adapters'] = [];
273 273
         }
274 274
 
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
     protected function decorate(string $output): string
326 326
     {
327 327
         foreach ($this->config['decorators'] as $decorator) {
328
-            if (! is_subclass_of($decorator, ViewDecoratorInterface::class)) {
328
+            if (!is_subclass_of($decorator, ViewDecoratorInterface::class)) {
329 329
                 throw ViewException::invalidDecorator($decorator);
330 330
             }
331 331
 
Please login to merge, or discard this patch.
src/Cli/Commands/Generators/Controller.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -120,9 +120,9 @@
 block discarded – undo
120 120
             ['{useStatement}', '{extends}'],
121 121
             [$useStatement, $extends],
122 122
             [
123
-				'type'      => $rest,
124
-				'invokable' => $this->option('invokable'),
125
-			]
123
+                'type'      => $rest,
124
+                'invokable' => $this->option('invokable'),
125
+            ]
126 126
         );
127 127
     }
128 128
 }
Please login to merge, or discard this patch.