@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | return true; |
93 | 93 | } |
94 | 94 | |
95 | - public function getHeader(string $name): ?string |
|
95 | + public function getHeader(string $name): ? string |
|
96 | 96 | { |
97 | 97 | return $this->headers[$name] ?? null; |
98 | 98 | } |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | /** |
116 | 116 | * @return interfaces\Route|null Route identified for request if set |
117 | 117 | */ |
118 | - public function route(): ?interfaces\Route |
|
118 | + public function route(): ? interfaces\Route |
|
119 | 119 | { |
120 | 120 | return $this->route; |
121 | 121 | } |
@@ -189,10 +189,10 @@ discard block |
||
189 | 189 | * @return Response|null |
190 | 190 | * @throws NoRouteSetError if a route has not been set prior to calling this, or by a middleware |
191 | 191 | */ |
192 | - public function response(): ?Response |
|
192 | + public function response(): ? Response |
|
193 | 193 | { |
194 | 194 | $cbs = $this->middlewares; |
195 | - $call_eventual_route_at_end_of_chain = function (Request $request, Chain $chain): ?Response { |
|
195 | + $call_eventual_route_at_end_of_chain = function(Request $request, Chain $chain): ? Response { |
|
196 | 196 | $route = $request->route(); |
197 | 197 | if (is_null($route)) { |
198 | 198 | throw new NoRouteSetError("Response called without Route set"); |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | * @param string $key Dot notation for deeper values, i.e. `user.email` |
229 | 229 | * @return mixed|interfaces\Session |
230 | 230 | */ |
231 | - public function session(?string $key = null) |
|
231 | + public function session(? string $key = null) |
|
232 | 232 | { |
233 | 233 | if (is_null($key)) { |
234 | 234 | if (session_status() != PHP_SESSION_ACTIVE) { |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | } |
95 | 95 | } |
96 | 96 | |
97 | - public function request(): ?Request |
|
97 | + public function request(): ? Request |
|
98 | 98 | { |
99 | 99 | return $this->request; |
100 | 100 | } |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | try { |
107 | 107 | $headfile = $this->getLayoutFile('head'); |
108 | 108 | if (file_exists($headfile)) { |
109 | - (function ($sldkfjlksejflskjflskdjflskdfj) { |
|
109 | + (function($sldkfjlksejflskjflskdjflskdfj) { |
|
110 | 110 | extract($this->data); |
111 | 111 | include $sldkfjlksejflskjflskdjflskdfj; |
112 | 112 | })($headfile); |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | |
115 | 115 | $neckfile = $this->getLayoutFile('neck'); |
116 | 116 | if (file_exists($neckfile)) { |
117 | - (function ($lidsinqjhsdfytqkwjkasjdksadsdg) { |
|
117 | + (function($lidsinqjhsdfytqkwjkasjdksadsdg) { |
|
118 | 118 | extract($this->data); |
119 | 119 | include $lidsinqjhsdfytqkwjkasjdksadsdg; |
120 | 120 | })($neckfile); |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | |
155 | 155 | ob_start(); |
156 | 156 | try { |
157 | - (function ($ldkfoskdfosjicyvutwehkshfskjdf) { |
|
157 | + (function($ldkfoskdfosjicyvutwehkshfskjdf) { |
|
158 | 158 | extract($this->data); |
159 | 159 | include $ldkfoskdfosjicyvutwehkshfskjdf; |
160 | 160 | })($footfile); |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | ob_start(); |
179 | 179 | try { |
180 | 180 | // or another way to hide the file variable? |
181 | - (function ($dsfjskdfjsdlkfjsdkfjsdkfjsdlkfjsd) { |
|
181 | + (function($dsfjskdfjsdlkfjsdkfjsdkfjsdlkfjsd) { |
|
182 | 182 | extract($this->data); |
183 | 183 | include $dsfjskdfjsdlkfjsdkfjsdkfjsdlkfjsd; |
184 | 184 | })($file); |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | * @param null|string $url |
220 | 220 | * @return string |
221 | 221 | */ |
222 | - private function templateFromUrl(?string $url = null): string |
|
222 | + private function templateFromUrl(? string $url = null) : string |
|
223 | 223 | { |
224 | 224 | $parts = \explode('/', $url); |
225 | 225 | $last = \array_slice($parts, -1, 1, true); |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | return $result->fetchAll(_PDO::FETCH_ASSOC); |
65 | 65 | } |
66 | 66 | |
67 | - public function one(string $table, array $conditions, array $options = []): ?array |
|
67 | + public function one(string $table, array $conditions, array $options = []): ? array |
|
68 | 68 | { |
69 | 69 | $result = $this->find($table, $conditions, $options); |
70 | 70 | $result = iterator_to_array($result); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | if (empty($conditions)) { |
110 | 110 | return ""; |
111 | 111 | } |
112 | - $fun = function ($o, $v) { |
|
112 | + $fun = function($o, $v) { |
|
113 | 113 | return "{$o}{$v} = :c_{$v}"; |
114 | 114 | }; |
115 | 115 | $where = array_reduce(array_keys($conditions), $fun, ""); |
@@ -174,13 +174,13 @@ discard block |
||
174 | 174 | |
175 | 175 | private function data(array $data): string |
176 | 176 | { |
177 | - $fun = function ($o, $v) { |
|
177 | + $fun = function($o, $v) { |
|
178 | 178 | return "{$o}{$v} = :d_{$v}"; |
179 | 179 | }; |
180 | 180 | return (string)array_reduce(array_keys($data), $fun, ""); |
181 | 181 | } |
182 | 182 | |
183 | - public function insert(string $table, array $data, array $options = []): ?string |
|
183 | + public function insert(string $table, array $data, array $options = []): ? string |
|
184 | 184 | { |
185 | 185 | $keys = implode(', ', array_keys($data)); |
186 | 186 | $data_phs = ':d_' . implode(', :d_', array_keys($data)); |