@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | list($class, $action, $permission, $payload) = $this->getRoute($this->request->getPath()); |
84 | 84 | |
85 | 85 | /** @var AbstractController $class */ |
86 | - $class = new $class($this->request); |
|
86 | + $class = new $class($this->request); |
|
87 | 87 | |
88 | 88 | if (!empty($permission)) { |
89 | 89 | |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | |
334 | 334 | array_splice($var, 0, 1); |
335 | 335 | |
336 | - if ($this->requestType === 'default' && in_array($this->request->getMethod(), $data['method'])) { |
|
336 | + if ($this->requestType === 'default' && in_array($this->request->getMethod(), $data['method'])) { |
|
337 | 337 | |
338 | 338 | return [ |
339 | 339 | $data['controller'], |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | */ |
157 | 157 | public function getVariable(string $key) |
158 | 158 | { |
159 | - if(isset($this->variable[$key])) { |
|
159 | + if (isset($this->variable[$key])) { |
|
160 | 160 | return $this->variable[$key]; |
161 | 161 | } |
162 | 162 | |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | */ |
172 | 172 | public function hasVariable(string $key) :bool |
173 | 173 | { |
174 | - if(isset($this->variable[$key])) { |
|
174 | + if (isset($this->variable[$key])) { |
|
175 | 175 | return true; |
176 | 176 | } |
177 | 177 | |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | */ |
187 | 187 | public function setVariables(array $variables = []) :self |
188 | 188 | { |
189 | - foreach($variables AS $key=>$value) { |
|
189 | + foreach ($variables AS $key=>$value) { |
|
190 | 190 | $this->setVariable($key, $value); |
191 | 191 | } |
192 | 192 | |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | */ |
273 | 273 | public function __call($name, $arguments) |
274 | 274 | { |
275 | - $coreViewHelper = __NAMESPACE__ . '\Helper\\' . ucfirst($name); |
|
275 | + $coreViewHelper = __NAMESPACE__ . '\Helper\\' . ucfirst($name); |
|
276 | 276 | |
277 | 277 | /* |
278 | 278 | if (!empty($this->viewHelpers[$coreViewHelper])) { |
@@ -327,8 +327,8 @@ discard block |
||
327 | 327 | */ |
328 | 328 | public function __destruct() |
329 | 329 | { |
330 | - unset( $this->variable ); |
|
331 | - unset( $this->template ); |
|
330 | + unset($this->variable); |
|
331 | + unset($this->template); |
|
332 | 332 | } |
333 | 333 | |
334 | 334 | } |
335 | 335 | \ No newline at end of file |
@@ -43,13 +43,13 @@ |
||
43 | 43 | $req .= 'Content-Length: ' . strlen($requestBody) . "\r\n"; |
44 | 44 | $req .= 'Connection: close' . "\r\n\r\n"; |
45 | 45 | |
46 | - $socket = stream_socket_client($protocol . $url . ':' . $port,$err, $errstr, 60, STREAM_CLIENT_CONNECT); |
|
46 | + $socket = stream_socket_client($protocol . $url . ':' . $port, $err, $errstr, 60, STREAM_CLIENT_CONNECT); |
|
47 | 47 | |
48 | 48 | fputs($socket, $req); |
49 | 49 | |
50 | 50 | $res = ''; |
51 | 51 | |
52 | - while(!feof($socket)) { $res .= fgets($socket, 128); } |
|
52 | + while (!feof($socket)) { $res .= fgets($socket, 128); } |
|
53 | 53 | fclose($socket); |
54 | 54 | |
55 | 55 | $this->response = $res; |
@@ -67,7 +67,7 @@ |
||
67 | 67 | |
68 | 68 | } |
69 | 69 | |
70 | - $path = str_replace('//' , '/', $path); |
|
70 | + $path = str_replace('//', '/', $path); |
|
71 | 71 | |
72 | 72 | if ($absolute) { |
73 | 73 |