Test Failed
Push — master ( 161beb...3e96d2 )
by Dan
08:17
created
Src/Router/Dispatcher/Dispatcher.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
     /**
191 191
      * Reflect Controller construct and get parameters.
192 192
      *
193
-     * @param $controllerName
193
+     * @param string $controllerName
194 194
      * @internal
195 195
      *
196 196
      * @return \ReflectionParameter[]
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
     /**
322 322
      * Checks controller instance against whitelist.
323 323
      *
324
-     * @param $controller
324
+     * @param string $controller
325 325
      * @param $options
326 326
      * @throws DispatchException
327 327
      */
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
     /**
356 356
      * Checks controller instance against blacklist.
357 357
      *
358
-     * @param $controller
358
+     * @param string $controller
359 359
      * @param $options
360 360
      * @throws DispatchException
361 361
      */
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
             case 'string':
84 84
 
85 85
                 $params = \explode($this->options['stringHandlerPattern'], $handler);
86
-                if (!isset($params[1])){
86
+                if (!isset($params[1])) {
87 87
                     $response = $handler;
88 88
                     break;
89 89
                 }
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 
125 125
         try {
126 126
             $resolvedHandler['controller'] = $this->_findClass($controllerMethod[0]);
127
-        } catch (\Exception $e) {
127
+        }catch (\Exception $e) {
128 128
             throw new DispatchException($e->getMessage());
129 129
         }
130 130
 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 
176 176
         try {
177 177
             $this->_getParamsFromVariableName($args);
178
-        } catch (\Exception $e) {
178
+        }catch (\Exception $e) {
179 179
             $this->_getParamsFromTypeHint($args);
180 180
         }
181 181
 
@@ -297,8 +297,8 @@  discard block
 block discarded – undo
297 297
     protected function _callController(ServerRequestInterface $request, string $controller, string $method)
298 298
     {
299 299
 
300
-        if (!class_exists($controller)){
301
-            throw new DispatchException('Unable to locate controller: '.$controller);
300
+        if (!class_exists($controller)) {
301
+            throw new DispatchException('Unable to locate controller: ' . $controller);
302 302
         }
303 303
 
304 304
         $controllerObj = new $controller(...$this->providedArguments);
@@ -306,13 +306,13 @@  discard block
 block discarded – undo
306 306
         try {
307 307
             $this->_checkWhiteList($controller, $this->options);
308 308
             $this->_checkBlackList($controller, $this->options);
309
-        } catch (\Exception $e) {
309
+        }catch (\Exception $e) {
310 310
             unset($controllerObj);
311 311
             throw new DispatchException($e->getMessage());
312 312
         }
313 313
 
314
-        if (!method_exists($controllerObj,$method)){
315
-            throw new DispatchException('Unable to locate method: '.$controller.'::'.$method);
314
+        if (!method_exists($controllerObj, $method)) {
315
+            throw new DispatchException('Unable to locate method: ' . $controller . '::' . $method);
316 316
         }
317 317
 
318 318
         return $controllerObj->{$method}($request);
Please login to merge, or discard this patch.