@@ -261,9 +261,9 @@ discard block |
||
| 261 | 261 | */ |
| 262 | 262 | protected function required(): bool |
| 263 | 263 | { |
| 264 | - $data = (array)$this->data(); |
|
| 264 | + $data = (array) $this->data(); |
|
| 265 | 265 | foreach ($this->required as $field) { |
| 266 | - if (empty($data[$field])) { |
|
| 266 | + if (empty($data[ $field ])) { |
|
| 267 | 267 | return false; |
| 268 | 268 | } |
| 269 | 269 | } |
@@ -275,8 +275,8 @@ discard block |
||
| 275 | 275 | */ |
| 276 | 276 | protected function safe(): ?array |
| 277 | 277 | { |
| 278 | - $safe = (array)$this->data; |
|
| 279 | - unset($safe[$this->primary]); |
|
| 278 | + $safe = (array) $this->data; |
|
| 279 | + unset($safe[ $this->primary ]); |
|
| 280 | 280 | |
| 281 | 281 | return $safe; |
| 282 | 282 | } |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | public function __construct() |
| 17 | 17 | { |
| 18 | - parent::__construct("users", ["first_name", "last_name"], "id", true, DATA_LAYER_CONFIG_2); |
|
| 18 | + parent::__construct("users", [ "first_name", "last_name" ], "id", true, DATA_LAYER_CONFIG_2); |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | public function fullName() |
@@ -25,10 +25,10 @@ |
||
| 25 | 25 | if (empty(self::$instance)) { |
| 26 | 26 | try { |
| 27 | 27 | self::$instance = new PDO( |
| 28 | - $bd["driver"] . ":host=" . $bd["host"] . ";dbname=" . $bd["dbname"] . ";port=" . $bd["port"], |
|
| 29 | - $bd["username"], |
|
| 30 | - $bd["passwd"], |
|
| 31 | - $bd["options"] |
|
| 28 | + $bd[ "driver" ] . ":host=" . $bd[ "host" ] . ";dbname=" . $bd[ "dbname" ] . ";port=" . $bd[ "port" ], |
|
| 29 | + $bd[ "username" ], |
|
| 30 | + $bd[ "passwd" ], |
|
| 31 | + $bd[ "options" ] |
|
| 32 | 32 | ); |
| 33 | 33 | } catch (PDOException $exception) { |
| 34 | 34 | self::$error = $exception; |