Passed
Push — master ( 93f7f3...84cab3 )
by Henri
01:20
created
src/Helper.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     }
34 34
 
35 35
     protected function ControllerForm($controller, string $method, array $values){
36
-		$this->check_role();
36
+        $this->check_role();
37 37
         $role = ($method !== 'method') ? $method : $this->getData()['POST']['role'];
38 38
         $data = (!is_null($values)) ? json_decode($values['data']) : null;
39 39
         $controller->$role($data);
Please login to merge, or discard this patch.
src/Router.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -61,25 +61,25 @@  discard block
 block discarded – undo
61 61
 
62 62
     public function set($url ,$walking , string $protocol): 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 72
         $this->check_typeRole($walking);
73 73
 
74
-		$route = [
75
-			'url' => $this->prefix.$url,
76
-			'role' => $walking,
77
-			'protocol' => $protocol,
78
-			'filters' => null,
74
+        $route = [
75
+            'url' => $this->prefix.$url,
76
+            'role' => $walking,
77
+            'protocol' => $protocol,
78
+            'filters' => null,
79 79
             'group' => self::getInstance()->group
80
-		];
80
+        ];
81 81
 
82
-		$this->routers[] = $route;		
82
+        $this->routers[] = $route;		
83 83
         
84 84
         return self::getInstance();
85 85
     }
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     {
142 142
         $this->byName($route_name);
143 143
 
144
-		$currentProtocol = $this->getProtocol();
144
+        $currentProtocol = $this->getProtocol();
145 145
 
146 146
         foreach(array_reverse($this->routers) as $r => $route){
147 147
 
@@ -151,17 +151,17 @@  discard block
 block discarded – undo
151 151
             
152 152
             $route_request = $this->explodeRoute((substr($_SERVER['REQUEST_URI'],strlen($_SERVER['REQUEST_URI'])-1,1) === '/') , $_SERVER['REQUEST_URI']);
153 153
 
154
-	        if($this->check_numparams($route_loop, $route_request) || !$this->check_parameters($route_loop, $route_request)){
154
+            if($this->check_numparams($route_loop, $route_request) || !$this->check_parameters($route_loop, $route_request)){
155 155
                 continue;
156 156
             }
157 157
             
158 158
             $this->check_filtering($route);
159 159
 
160 160
             $this->toHiking($route['role']);
161
-	        return true;
162
-	    }
161
+            return true;
162
+        }
163 163
 
164
-	    throw new Exception('Page not found.',404);
164
+        throw new Exception('Page not found.',404);
165 165
     }
166 166
 
167 167
     public static function filter($filters): Router
Please login to merge, or discard this patch.