Completed
Push — master ( 39dce4...f4117b )
by Anderson
01:57
created
src/Middleware/Request.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
             if (ENVIRONMENT != 'production')
96 96
                 show_error('The request method '.$this->requestMethod.' is not allowed to view the resource', 403, 'Forbidden method');
97 97
 
98
-            if(is_null(Route::get404()))
98
+            if (is_null(Route::get404()))
99 99
                 show_404();
100 100
 
101 101
             if (Route::get404()->controller != get_class($this->CI))
@@ -110,16 +110,16 @@  discard block
 block discarded – undo
110 110
 
111 111
                 // Redirect to 404 if not enough parameters provided
112 112
 
113
-                if(count($path_args) < count($route_args['required']))
113
+                if (count($path_args) < count($route_args['required']))
114 114
                     redirect(Route::get404()->path);
115 115
 
116
-                if(count($path_args) == 0)
116
+                if (count($path_args) == 0)
117 117
                 {
118 118
                     $this->CI->{$this->route->method}();
119 119
                 }
120 120
                 else
121 121
                 {
122
-                    call_user_func_array( [$this->CI, $this->route->method], array_values($path_args) );
122
+                    call_user_func_array([$this->CI, $this->route->method], array_values($path_args));
123 123
                 }
124 124
 
125 125
                 // TODO: Add support to hooks in this execution thread
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
                 if (ENVIRONMENT != 'production')
133 133
                     show_error('The method '.$this->route->controller.'::'.$this->route->method.'() does not exists', 500, 'Method not found');
134 134
 
135
-                if(is_null(Route::get404()))
135
+                if (is_null(Route::get404()))
136 136
                     show_404();
137 137
 
138 138
                 if (Route::get404()->controller != get_class($this->CI))
Please login to merge, or discard this patch.