Passed
Push — master ( bf2098...3f372a )
by Henri
01:15
created
src/Helper.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
     }
41 41
 
42 42
     protected function ControllerForm($controller, string $method, array $values){
43
-		if(Validator::execute($values)){
43
+        if(Validator::execute($values)){
44 44
 
45 45
             $this->check_role();
46 46
 
Please login to merge, or discard this patch.
src/Router.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -61,23 +61,23 @@  discard block
 block discarded – undo
61 61
 
62 62
     public function set($url , $role , $protocol = null): Router
63 63
     {
64
-		$url = (substr($url,0,1) !=='/' and strlen($url) > 0) ? "/{$url}" : $url;
64
+        $url = (substr($url,0,1) !=='/' and strlen($url) > 0) ? "/{$url}" : $url;
65 65
 
66
-    	foreach($this->routers as $key => $value){
67
-    		if( md5($this->prefix . $value['url'] . $value['protocol'] ) === md5( $url . $protocol ) ){
66
+        foreach($this->routers as $key => $value){
67
+            if( md5($this->prefix . $value['url'] . $value['protocol'] ) === md5( $url . $protocol ) ){
68 68
                 throw new Exception("There is already a route with the url {$url} and with the {$protocol} protocol configured.");
69 69
             }
70
-    	}
70
+        }
71 71
 
72
-		$route = [
73
-			'url' => $this->prefix.$url,
74
-			'role' => $role,
75
-			'protocol' => $protocol,
76
-			'filters' => null,
72
+        $route = [
73
+            'url' => $this->prefix.$url,
74
+            'role' => $role,
75
+            'protocol' => $protocol,
76
+            'filters' => null,
77 77
             'group' => self::getInstance()->group
78
-		];
78
+        ];
79 79
 
80
-		$this->routers[] = $route;		
80
+        $this->routers[] = $route;		
81 81
         
82 82
         return self::getInstance();
83 83
     }
@@ -140,13 +140,13 @@  discard block
 block discarded – undo
140 140
     {
141 141
         $this->byName($route_name);
142 142
 
143
-		$currentProtocol = $this->getProtocol();
143
+        $currentProtocol = $this->getProtocol();
144 144
 
145 145
         foreach(array_reverse($this->routers) as $r => $route){
146 146
 
147 147
             $this->hasProtocol($route, $currentProtocol);
148 148
 
149
-	        $route_loop = explode(
149
+            $route_loop = explode(
150 150
                 '/',
151 151
                 (substr($route['url'],strlen($route['url'])-1,1) === '/') 
152 152
                     ? substr($route['url'], 0, -1) 
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                 : $_SERVER['REQUEST_URI'] 
161 161
             );
162 162
 
163
-	        if($this->check_numparams($route_loop, $route_request)){
163
+            if($this->check_numparams($route_loop, $route_request)){
164 164
                 continue;
165 165
             }
166 166
 
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
                 //    $data[ substr($param,1,strlen($param)-2) ] = $route_request[$rr];    
170 170
                 //}
171 171
 
172
-	            if($this->check_parameter($param, $route_request[$rr])){
172
+                if($this->check_parameter($param, $route_request[$rr])){
173 173
                     continue 2;
174 174
                 }
175 175
             }
@@ -177,10 +177,10 @@  discard block
 block discarded – undo
177 177
             $this->check_filtering($route);
178 178
 
179 179
             $this->Controller($route['role']);
180
-	        return true;
181
-	    }
180
+            return true;
181
+        }
182 182
 
183
-	    throw new Exception('Page not found.',404);
183
+        throw new Exception('Page not found.',404);
184 184
     }
185 185
 
186 186
     public static function filter($filters): Router
Please login to merge, or discard this patch.