Passed
Branch master (11fee5)
by Henri
01:26
created
src/Helper.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
         if( ($this->getProtocol() == 'form') ){
79 79
             $this->ControllerForm($controller, $method, $data['POST']);
80
-        }else {
80
+        } else {
81 81
             $data = (array_key_exists('data',$data['POST'])) ? json_decode($data['POST']['data'], true) : $data['GET'];
82 82
             call_user_func_array([$controller,$method],  $data);
83 83
         }
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         if($route[$state] !== null){
124 124
             if(is_string($route[$state])){
125 125
                 $this->Controller($route[$state]);
126
-            }else{
126
+            } else{
127 127
                 $route[$state]();
128 128
             }
129 129
         }
Please login to merge, or discard this patch.
src/Router.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -40,28 +40,28 @@  discard block
 block discarded – undo
40 40
     {
41 41
         $this->lastReturn = null;
42 42
         
43
-		$url = (substr($url,0,1) !=='/' and strlen($url) > 0) ? "/{$url}" : $url;
43
+        $url = (substr($url,0,1) !=='/' and strlen($url) > 0) ? "/{$url}" : $url;
44 44
 
45
-    	foreach($this->routers as $key => $value){
46
-    		if( md5($this->prefix . $value['url'] . $value['protocol'] ) === md5( $url . $protocol ) ){
45
+        foreach($this->routers as $key => $value){
46
+            if( md5($this->prefix . $value['url'] . $value['protocol'] ) === md5( $url . $protocol ) ){
47 47
                 throw new Exception("There is already a route with the url {$url} and with the {$protocol} protocol configured.");
48 48
             }
49 49
         }
50 50
         
51 51
         $this->checkTypeRole($walking);
52 52
 
53
-		$route = [
54
-			'url' => $this->prefix.$url,
55
-			'role' => $walking,
56
-			'protocol' => $protocol,
53
+        $route = [
54
+            'url' => $this->prefix.$url,
55
+            'role' => $walking,
56
+            'protocol' => $protocol,
57 57
             'filters' => null,
58 58
             'where' => null,
59 59
             'before' => null,
60 60
             'after' => null,
61 61
             'group' => self::getInstance()->group
62
-		];
62
+        ];
63 63
 
64
-		$this->routers[] = $route;		
64
+        $this->routers[] = $route;		
65 65
         
66 66
         return self::getInstance();
67 67
     }
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 
136 136
         $instance->getInstance()->byName($routeName);
137 137
 
138
-		$currentProtocol = $instance->getInstance()->getProtocol();
138
+        $currentProtocol = $instance->getInstance()->getProtocol();
139 139
 
140 140
         foreach(array_reverse($instance->getInstance()->routers) as $r => $route){
141 141
 
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
         
169 169
         $instance->getInstance()->currentRoute = null;
170 170
 
171
-	    throw new Exception('Page not found.',404);
171
+        throw new Exception('Page not found.',404);
172 172
     }
173 173
 
174 174
     public function filter($filters): Router
Please login to merge, or discard this patch.