Passed
Branch master (817642)
by Henri
02:11
created
src/RunInTrait.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,7 +93,9 @@  discard block
 block discarded – undo
93 93
             $ReflectionMethod =  new \ReflectionFunction($closure);
94 94
 
95 95
             foreach($ReflectionMethod->getParameters() as $param){
96
-                if(!isset($_REQUEST[$param->name])) continue;
96
+                if(!isset($_REQUEST[$param->name])) {
97
+                    continue;
98
+                }
97 99
                 $params[$param->name] = $_REQUEST[$param->name];
98 100
             }
99 101
             
@@ -176,7 +178,9 @@  discard block
 block discarded – undo
176 178
         $ReflectionMethod =  new \ReflectionMethod(new $controller(), $method);
177 179
 
178 180
         foreach($ReflectionMethod->getParameters() as $param){
179
-            if(!isset($_REQUEST[$param->name])) continue;
181
+            if(!isset($_REQUEST[$param->name])) {
182
+                continue;
183
+            }
180 184
             $params[$param->name] = $_REQUEST[$param->name];
181 185
         }
182 186
 
Please login to merge, or discard this patch.
src/AttributeTrait.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,9 @@  discard block
 block discarded – undo
35 35
     {
36 36
         try{
37 37
             foreach ($method->getAttributes() as $attr) {
38
-                if($attr->getName() != 'HnrAzevedo\Router\RouteAttribute') continue;
38
+                if($attr->getName() != 'HnrAzevedo\Router\RouteAttribute') {
39
+                    continue;
40
+                }
39 41
 
40 42
                 $args = $attr->getArguments();
41 43
     
@@ -54,7 +56,7 @@  discard block
 block discarded – undo
54 56
                     ->attrWhere($args)
55 57
                     ->attrMiddleware($args);
56 58
             }
57
-        }catch(Exception $er){
59
+        } catch(Exception $er){
58 60
             throw new Exception('Failed to add route via attribute: '.$er->getMessage());
59 61
         }
60 62
     }
Please login to merge, or discard this patch.
src/Router.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
                 self::getInstance()->checkMethod($route, $requestMethod);
100 100
                 self::getInstance()->checkData($route, (new Uri($_SERVER['REQUEST_URI']))->getPath());
101 101
                 return self::getInstance();
102
-            }catch(\Exception $er){
102
+            } catch(\Exception $er){
103 103
                 continue;
104 104
             }
105 105
         }
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
         try{
127 127
             $action = unserialize(self::getInstance()->current()['action']);
128 128
             self::getInstance()->executeRouteAction((is_string($action)) ? $action : $action->getClosure());
129
-        }catch(\Exception $er){
129
+        } catch(\Exception $er){
130 130
             self::getInstance()->error = $er;
131 131
         }
132 132
         
Please login to merge, or discard this patch.
examples/AttributeExample.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      */ 
36 36
     $action = Router::currentAction();
37 37
 
38
-}catch(Exception $er){
38
+} catch(Exception $er){
39 39
 
40 40
     die("Code Error: {$er->getCode()}".PHP_EOL."Line: {$er->getLine()}".PHP_EOL."File: {$er->getFile()}".PHP_EOL."Message: {$er->getMessage()}.");
41 41
 
Please login to merge, or discard this patch.