@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | unset($options['with']); |
79 | 79 | $result = static::db()->find(static::table(), $conditions, $options); |
80 | 80 | $pk = static::pk(); |
81 | - $gen = function () use ($result, $pk, $with) { |
|
81 | + $gen = function() use ($result, $pk, $with) { |
|
82 | 82 | foreach ($result as $row) { |
83 | 83 | $model = new static($row); |
84 | 84 | if ($with) { |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | return iterator_to_array($generator); |
103 | 103 | } |
104 | 104 | |
105 | - private static function fields(): ?array |
|
105 | + private static function fields(): ? array |
|
106 | 106 | { |
107 | 107 | return isset(static::$fields) ? static::$fields : null; |
108 | 108 | } |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | if ($fields) { |
114 | 114 | $data = array_filter( |
115 | 115 | $data, |
116 | - function ($key) use ($fields) { |
|
116 | + function($key) use ($fields) { |
|
117 | 117 | return in_array($key, $fields); |
118 | 118 | }, |
119 | 119 | ARRAY_FILTER_USE_KEY |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $this->route = Router::match($this->url, $this->method); |
63 | 63 | } |
64 | 64 | |
65 | - public function getHeader(string $name): ?string |
|
65 | + public function getHeader(string $name): ? string |
|
66 | 66 | { |
67 | 67 | return $this->headers[$name] ?? null; |
68 | 68 | } |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | * @param string $key Dot notation for deeper values, i.e. `user.email` |
173 | 173 | * @return mixed/null |
174 | 174 | */ |
175 | - public function session(?string $key = null) |
|
175 | + public function session(? string $key = null) |
|
176 | 176 | { |
177 | 177 | if (session_status() != PHP_SESSION_ACTIVE) { |
178 | 178 | session_start(); |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | try { |
95 | 95 | $headfile = $this->getLayoutFile('head'); |
96 | 96 | if (file_exists($headfile)) { |
97 | - (function ($sldkfjlksejflskjflskdjflskdfj) { |
|
97 | + (function($sldkfjlksejflskjflskdjflskdfj) { |
|
98 | 98 | extract($this->data); |
99 | 99 | include $sldkfjlksejflskjflskdjflskdfj; |
100 | 100 | })($headfile); |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | |
103 | 103 | $neckfile = $this->getLayoutFile('neck'); |
104 | 104 | if (file_exists($neckfile)) { |
105 | - (function ($lidsinqjhsdfytqkwjkasjdksadsdg) { |
|
105 | + (function($lidsinqjhsdfytqkwjkasjdksadsdg) { |
|
106 | 106 | extract($this->data); |
107 | 107 | include $lidsinqjhsdfytqkwjkasjdksadsdg; |
108 | 108 | })($neckfile); |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | |
143 | 143 | ob_start(); |
144 | 144 | try { |
145 | - (function ($ldkfoskdfosjicyvutwehkshfskjdf) { |
|
145 | + (function($ldkfoskdfosjicyvutwehkshfskjdf) { |
|
146 | 146 | extract($this->data); |
147 | 147 | include $ldkfoskdfosjicyvutwehkshfskjdf; |
148 | 148 | })($footfile); |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | ob_start(); |
168 | 168 | try { |
169 | 169 | // or another way to hide the file variable? |
170 | - (function ($dsfjskdfjsdlkfjsdkfjsdkfjsdlkfjsd) { |
|
170 | + (function($dsfjskdfjsdlkfjsdkfjsdkfjsdlkfjsd) { |
|
171 | 171 | extract($this->data); |
172 | 172 | include $dsfjskdfjsdlkfjsdkfjsdkfjsdlkfjsd; |
173 | 173 | })($file); |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | $this->template = "{$template}.{$this->type}"; |
204 | 204 | } |
205 | 205 | |
206 | - private function templateFromUrl(?string $url = null): string |
|
206 | + private function templateFromUrl(? string $url = null) : string |
|
207 | 207 | { |
208 | 208 | $parts = \explode('/', $url); |
209 | 209 | $last = \array_slice($parts, -1, 1, true); |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | return self::$settings[$environment][$config_name]; |
57 | 57 | } |
58 | 58 | |
59 | - public static function grab(?string $environment = null): array |
|
59 | + public static function grab(? string $environment = null) : array |
|
60 | 60 | { |
61 | 61 | if (is_null($environment)) { |
62 | 62 | $environment = static::current(); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | * @param mixed $value |
75 | 75 | * @param null|string $environment if not specified, configures CURRENT environment only. E::ALL, sets for all envs. |
76 | 76 | */ |
77 | - public static function put(string $config_name, $value, ?string $environment = null): void |
|
77 | + public static function put(string $config_name, $value, ? string $environment = null) : void |
|
78 | 78 | { |
79 | 79 | if (is_null($environment)) { |
80 | 80 | $environment = static::current(); |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | * @param array $configs |
99 | 99 | * @param null|string $environment |
100 | 100 | */ |
101 | - public static function add(array $configs, ?string $environment = null): void |
|
101 | + public static function add(array $configs, ? string $environment = null) : void |
|
102 | 102 | { |
103 | 103 | if (is_null($environment)) { |
104 | 104 | $environment = static::current(); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | * @param array $configs |
123 | 123 | * @param null|string $environment |
124 | 124 | */ |
125 | - public static function set(array $configs, ?string $environment = null): void |
|
125 | + public static function set(array $configs, ? string $environment = null) : void |
|
126 | 126 | { |
127 | 127 | if (is_null($environment)) { |
128 | 128 | $environment = static::current(); |