@@ -277,9 +277,9 @@ discard block |
||
277 | 277 | */ |
278 | 278 | protected function required(): bool |
279 | 279 | { |
280 | - $data = (array)$this->data(); |
|
280 | + $data = (array) $this->data(); |
|
281 | 281 | foreach ($this->required as $field) { |
282 | - if (empty($data[$field])) { |
|
282 | + if (empty($data[ $field ])) { |
|
283 | 283 | return false; |
284 | 284 | } |
285 | 285 | } |
@@ -291,8 +291,8 @@ discard block |
||
291 | 291 | */ |
292 | 292 | protected function safe(): ?array |
293 | 293 | { |
294 | - $safe = (array)$this->data; |
|
295 | - unset($safe[$this->primary]); |
|
294 | + $safe = (array) $this->data; |
|
295 | + unset($safe[ $this->primary ]); |
|
296 | 296 | return $safe; |
297 | 297 | } |
298 | 298 | |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | protected function toCamelCase(string $string): string |
305 | 305 | { |
306 | 306 | $camelCase = str_replace(' ', '', ucwords(str_replace('_', ' ', $string))); |
307 | - $camelCase[0] = strtolower($camelCase[0]); |
|
307 | + $camelCase[ 0 ] = strtolower($camelCase[ 0 ]); |
|
308 | 308 | return $camelCase; |
309 | 309 | } |
310 | 310 | } |
@@ -15,7 +15,7 @@ |
||
15 | 15 | */ |
16 | 16 | public function __construct() |
17 | 17 | { |
18 | - parent::__construct("users", ["first_name", "last_name"]); |
|
18 | + parent::__construct("users", [ "first_name", "last_name" ]); |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | public function fullName() |