| @@ -81,11 +81,11 @@ discard block | ||
| 81 | 81 | public static function find(array $conditions = [], array $options = []): \Generator | 
| 82 | 82 |      { | 
| 83 | 83 | $conditions = self::filterByFields($conditions); | 
| 84 | -        $with = array_key_exists('with', $options) ? (array)$options['with'] : false; | |
| 84 | +        $with = array_key_exists('with', $options) ? (array) $options['with'] : false; | |
| 85 | 85 | unset($options['with']); | 
| 86 | 86 | $result = static::db()->find(static::table(), $conditions, $options); | 
| 87 | 87 | $pk = static::pk(); | 
| 88 | -        $gen = function () use ($result, $pk, $with) { | |
| 88 | +        $gen = function() use ($result, $pk, $with) { | |
| 89 | 89 |              foreach ($result as $row) { | 
| 90 | 90 | $model = new static($row); | 
| 91 | 91 |                  if ($with) { | 
| @@ -130,7 +130,7 @@ discard block | ||
| 130 | 130 |          if (empty($fields) === false) { | 
| 131 | 131 | $data = array_filter( | 
| 132 | 132 | $data, | 
| 133 | -                function ($key) use ($fields) { | |
| 133 | +                function($key) use ($fields) { | |
| 134 | 134 | return in_array($key, $fields); | 
| 135 | 135 | }, | 
| 136 | 136 | ARRAY_FILTER_USE_KEY | 
| @@ -142,7 +142,7 @@ discard block | ||
| 142 | 142 |          if (empty($conditions)) { | 
| 143 | 143 | return ""; | 
| 144 | 144 | } | 
| 145 | -        $fun = function ($o, $v) use ($conditions) { | |
| 145 | +        $fun = function($o, $v) use ($conditions) { | |
| 146 | 146 |              if (is_array($conditions[$v])) { | 
| 147 | 147 | $qa = []; | 
| 148 | 148 |                  foreach ($conditions[$v] as $key => $value) { | 
| @@ -229,7 +229,7 @@ discard block | ||
| 229 | 229 | |
| 230 | 230 | private function data(array $data): string | 
| 231 | 231 |      { | 
| 232 | -        $fun = function ($o, $v) { | |
| 232 | +        $fun = function($o, $v) { | |
| 233 | 233 |              return "{$o}, {$v} = :d_{$v}"; | 
| 234 | 234 | }; | 
| 235 | 235 | return trim((string) array_reduce(array_keys($data), $fun, ""), ", "); | 
| @@ -129,7 +129,7 @@ | ||
| 129 | 129 | public function response(): ?Response | 
| 130 | 130 |      { | 
| 131 | 131 | $cbs = $this->middlewares; | 
| 132 | -        $call_eventual_route_at_end_of_chain = function (Request $request, Chain $chain): ?Response { | |
| 132 | +        $call_eventual_route_at_end_of_chain = function(Request $request, Chain $chain): ?Response { | |
| 133 | 133 | $route = $request->route(); | 
| 134 | 134 |              if (is_null($route)) { | 
| 135 | 135 |                  if (Environment::get('debug')) { | 
| @@ -105,7 +105,7 @@ discard block | ||
| 105 | 105 | |
| 106 | 106 | $parameters = array_filter( | 
| 107 | 107 | $matches, | 
| 108 | -                function ($v) { | |
| 108 | +                function($v) { | |
| 109 | 109 | return !is_int($v); | 
| 110 | 110 | }, | 
| 111 | 111 | \ARRAY_FILTER_USE_KEY | 
| @@ -128,7 +128,7 @@ discard block | ||
| 128 | 128 | $url = self::$aliases[$url] ?? $url; | 
| 129 | 129 | return new Route( | 
| 130 | 130 | $url, | 
| 131 | -            function (Request $request): ?Response { | |
| 131 | +            function(Request $request): ?Response { | |
| 132 | 132 | $page = response\Page::fromRequest($request); | 
| 133 | 133 | // @TODO BC breaking, but move this? | 
| 134 | 134 | return $page->isValid() ? $page : null; | 
| @@ -130,14 +130,14 @@ discard block | ||
| 130 | 130 | ob_start(); | 
| 131 | 131 |          try { | 
| 132 | 132 |              if ($headfile && file_exists($headfile)) { | 
| 133 | -                (function ($sldkfjlksejflskjflskdjflskdfj) { | |
| 133 | +                (function($sldkfjlksejflskjflskdjflskdfj) { | |
| 134 | 134 | extract($this->data); | 
| 135 | 135 | include $sldkfjlksejflskjflskdjflskdfj; | 
| 136 | 136 | })($headfile); | 
| 137 | 137 | } | 
| 138 | 138 | |
| 139 | 139 |              if ($neckfile && file_exists($neckfile)) { | 
| 140 | -                (function ($lidsinqjhsdfytqkwjkasjdksadsdg) { | |
| 140 | +                (function($lidsinqjhsdfytqkwjkasjdksadsdg) { | |
| 141 | 141 | extract($this->data); | 
| 142 | 142 | include $lidsinqjhsdfytqkwjkasjdksadsdg; | 
| 143 | 143 | })($neckfile); | 
| @@ -179,7 +179,7 @@ discard block | ||
| 179 | 179 |          if ($footfile && file_exists($footfile)) { | 
| 180 | 180 | ob_start(); | 
| 181 | 181 |              try { | 
| 182 | -                (function ($ldkfoskdfosjicyvutwehkshfskjdf) { | |
| 182 | +                (function($ldkfoskdfosjicyvutwehkshfskjdf) { | |
| 183 | 183 | extract($this->data); | 
| 184 | 184 | include $ldkfoskdfosjicyvutwehkshfskjdf; | 
| 185 | 185 | })($footfile); | 
| @@ -204,7 +204,7 @@ discard block | ||
| 204 | 204 | ob_start(); | 
| 205 | 205 |          try { | 
| 206 | 206 | // or another way to hide the file variable? | 
| 207 | -            (function ($dsfjskdfjsdlkfjsdkfjsdkfjsdlkfjsd) { | |
| 207 | +            (function($dsfjskdfjsdlkfjsdkfjsdkfjsdlkfjsd) { | |
| 208 | 208 | extract($this->data); | 
| 209 | 209 | include $dsfjskdfjsdlkfjsdkfjsdkfjsdlkfjsd; | 
| 210 | 210 | })($file); |