@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | */ |
125 | 125 | protected function locate($key, $member) |
126 | 126 | { |
127 | - $aliases = array_filter($this->members, function ($n) use ($member) { |
|
127 | + $aliases = array_filter($this->members, function($n) use ($member) { |
|
128 | 128 | if ($n instanceof Closure) { |
129 | 129 | return $n($this) instanceof $member; |
130 | 130 | } |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | */ |
148 | 148 | protected function getParams() |
149 | 149 | { |
150 | - return function (ReflectionParameter $param) { |
|
150 | + return function(ReflectionParameter $param) { |
|
151 | 151 | return $param->getClass(); |
152 | 152 | }; |
153 | 153 | } |
@@ -103,9 +103,9 @@ discard block |
||
103 | 103 | { |
104 | 104 | $userInfo = $this->getUserInfo(); |
105 | 105 | |
106 | - return rtrim(($userInfo ? $userInfo . '@' : '') |
|
106 | + return rtrim(($userInfo ? $userInfo.'@' : '') |
|
107 | 107 | . $this->host |
108 | - . (!$this->isStandardPort($this->scheme, $this->port) ? ':' . $this->port : ''), |
|
108 | + . (!$this->isStandardPort($this->scheme, $this->port) ? ':'.$this->port : ''), |
|
109 | 109 | ':'); |
110 | 110 | } |
111 | 111 | |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | */ |
187 | 187 | public function withScheme($scheme) |
188 | 188 | { |
189 | - $scheme = str_replace('://', '', strtolower((string)$scheme)); |
|
189 | + $scheme = str_replace('://', '', strtolower((string) $scheme)); |
|
190 | 190 | |
191 | 191 | if (!empty($scheme) && !array_key_exists($scheme, $this->schemes)) { |
192 | 192 | throw new InvalidArgumentException('Invalid scheme provided.'); |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | throw new InvalidArgumentException('Invalid port specified'); |
239 | 239 | } |
240 | 240 | |
241 | - return $this->_clone('port', (int)$port); |
|
241 | + return $this->_clone('port', (int) $port); |
|
242 | 242 | } |
243 | 243 | |
244 | 244 | /** |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | } |
256 | 256 | |
257 | 257 | if (!empty($path) && '/' !== substr($path, 0, 1)) { |
258 | - $path = '/' . $path; |
|
258 | + $path = '/'.$path; |
|
259 | 259 | } |
260 | 260 | |
261 | 261 | return $this->_clone('path', $this->filterPath($path)); |
@@ -302,11 +302,11 @@ discard block |
||
302 | 302 | $query = $this->getQuery(); |
303 | 303 | $fragment = $this->getFragment(); |
304 | 304 | |
305 | - return ($scheme ? $scheme . '://' : '') |
|
305 | + return ($scheme ? $scheme.'://' : '') |
|
306 | 306 | . ($authority ?: '') |
307 | 307 | . $path |
308 | - . ($query ? '?' . $query : '') |
|
309 | - . ($fragment ? '#' . $fragment : ''); |
|
308 | + . ($query ? '?'.$query : '') |
|
309 | + . ($fragment ? '#'.$fragment : ''); |
|
310 | 310 | } |
311 | 311 | |
312 | 312 | /** |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | $this->$key = $val; |
325 | 325 | } |
326 | 326 | |
327 | - $this->userInfo = $this->user . ($this->pass ? ":$this->pass" : null); |
|
327 | + $this->userInfo = $this->user.($this->pass ? ":$this->pass" : null); |
|
328 | 328 | } |
329 | 329 | |
330 | 330 |
@@ -108,7 +108,7 @@ |
||
108 | 108 | public function withStatus($code, $reasonPhrase = '') |
109 | 109 | { |
110 | 110 | $instance = clone $this; |
111 | - $code = (int)$code; |
|
111 | + $code = (int) $code; |
|
112 | 112 | if ($code < 100 || $code >= 600) { |
113 | 113 | throw new \InvalidArgumentException(sprintf('Invalid status code %d', $code)); |
114 | 114 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $route = $this->router->resolve($request); |
45 | 45 | |
46 | 46 | $response = $this->resolve($route->getAction(), $route->getQueryParams()); |
47 | - if(false === $response instanceof ResponseInterface) { |
|
47 | + if (false === $response instanceof ResponseInterface) { |
|
48 | 48 | $response = Response::create($response); |
49 | 49 | } |
50 | 50 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | */ |
102 | 102 | protected function getParams() |
103 | 103 | { |
104 | - return function (ReflectionParameter $param) { |
|
104 | + return function(ReflectionParameter $param) { |
|
105 | 105 | return (string) $param->getType(); |
106 | 106 | }; |
107 | 107 | } |
@@ -27,7 +27,7 @@ |
||
27 | 27 | public function tab() |
28 | 28 | { |
29 | 29 | return [ |
30 | - 'title' => count($this->db->getQueries()) . ' Queries' |
|
30 | + 'title' => count($this->db->getQueries()).' Queries' |
|
31 | 31 | ]; |
32 | 32 | } |
33 | 33 | } |
@@ -20,12 +20,12 @@ discard block |
||
20 | 20 | public function __construct() |
21 | 21 | { |
22 | 22 | register_shutdown_function($this->handleFatalError()); |
23 | - if(getenv('APP_ENV') !== 'testing') { |
|
23 | + if (getenv('APP_ENV') !== 'testing') { |
|
24 | 24 | set_error_handler($this->setErrorHandler()); |
25 | 25 | set_exception_handler($this->setExceptionHandler()); |
26 | 26 | } |
27 | 27 | |
28 | - $this->register('Exception', function (Exception $exception) { |
|
28 | + $this->register('Exception', function(Exception $exception) { |
|
29 | 29 | $handler = new ExceptionHandler($exception); |
30 | 30 | $handler->display(); |
31 | 31 | }); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | { |
53 | 53 | try { |
54 | 54 | |
55 | - $handlers = array_filter($this->handlers, function ($handler) use ($exception) { |
|
55 | + $handlers = array_filter($this->handlers, function($handler) use ($exception) { |
|
56 | 56 | return $exception instanceof $handler[0]; |
57 | 57 | }); |
58 | 58 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | */ |
76 | 76 | protected function setExceptionHandler() |
77 | 77 | { |
78 | - return function ($exception) { |
|
78 | + return function($exception) { |
|
79 | 79 | $this->handle($exception); |
80 | 80 | }; |
81 | 81 | } |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | */ |
87 | 87 | protected function setErrorHandler() |
88 | 88 | { |
89 | - return function ($severity, $message, $file, $line) { |
|
89 | + return function($severity, $message, $file, $line) { |
|
90 | 90 | if (error_reporting() && $severity) { |
91 | 91 | throw new ErrorException($message, 0, $severity, $file, $line); |
92 | 92 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | */ |
102 | 102 | protected function handleFatalError() |
103 | 103 | { |
104 | - return function () { |
|
104 | + return function() { |
|
105 | 105 | $error = error_get_last(); |
106 | 106 | |
107 | 107 | if ($error && $error['type'] === E_ERROR) { |