Completed
Push — master ( f268fd...b09da1 )
by Vermeulen
05:14 queued 03:13
created
Category
src/classes/Routing.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -49,12 +49,12 @@  discard block
 block discarded – undo
49 49
         $dispatcher = FastRoute\simpleDispatcher(
50 50
         function(FastRoute\RouteCollector $router) use ($routes)
51 51
         {
52
-            foreach($routes as $slug => $infos)
52
+            foreach ($routes as $slug => $infos)
53 53
             {
54 54
                 $slug = trim($slug);
55 55
 
56 56
                 $method = ['GET', 'HEAD', 'POST', 'PUT', 'PATCH', 'DELETE'];
57
-                if(isset($infos['httpMethod']))
57
+                if (isset($infos['httpMethod']))
58 58
                 {
59 59
                     $method = $infos['httpMethod'];
60 60
                 }
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             }
67 67
         });
68 68
         
69
-        if($request === '')
69
+        if ($request === '')
70 70
         {
71 71
             $request = '/';
72 72
         }
@@ -75,23 +75,23 @@  discard block
 block discarded – undo
75 75
         $routeStatus = $routeInfo[0];
76 76
         $routeError  = 0;
77 77
 
78
-        if($routeStatus === FastRoute\Dispatcher::METHOD_NOT_ALLOWED)
78
+        if ($routeStatus === FastRoute\Dispatcher::METHOD_NOT_ALLOWED)
79 79
         {
80 80
             $routeError = 405;
81 81
         }
82
-        if($routeStatus !== FastRoute\Dispatcher::FOUND)
82
+        if ($routeStatus !== FastRoute\Dispatcher::FOUND)
83 83
         {
84 84
             $routeError = 404;
85 85
         }
86 86
 
87
-        if($routeError !== 0)
87
+        if ($routeError !== 0)
88 88
         {
89 89
             ErrorView($routeError, true);
90 90
             //exit doing in ErrorView
91 91
         }
92 92
 
93 93
         $fastRouteCallback = $this->config->routeCallback;
94
-        if(isset($fastRouteCallback) && is_callable($fastRouteCallback))
94
+        if (isset($fastRouteCallback) && is_callable($fastRouteCallback))
95 95
         {
96 96
             $fastRouteCallback($returnObj, $routeInfo[1]);
97 97
         }
@@ -110,17 +110,17 @@  discard block
 block discarded – undo
110 110
 
111 111
     public static function routeCallback(&$returnObj, &$handler)
112 112
     {
113
-        if(isset($handler['file']))
113
+        if (isset($handler['file']))
114 114
         {
115 115
             $returnObj->fileArbo = $handler['file'];
116 116
         }
117 117
 
118
-        if(isset($handler['class']))
118
+        if (isset($handler['class']))
119 119
         {
120 120
             $returnObj->nameCtr = $handler['class'];
121 121
         }
122 122
 
123
-        if(isset($handler['method']))
123
+        if (isset($handler['method']))
124 124
         {
125 125
             $returnObj->nameMethode = $handler['method'];
126 126
         }
Please login to merge, or discard this patch.