@@ -110,7 +110,7 @@ |
||
110 | 110 | return ($this->data->$name ?? null); |
111 | 111 | } |
112 | 112 | |
113 | - /* |
|
113 | + /* |
|
114 | 114 | * @return array|null |
115 | 115 | */ |
116 | 116 | private function getColumns() : ?array |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | */ |
116 | 116 | private function getColumns() : ?array |
117 | 117 | { |
118 | - $stmt = Connect::getInstance()->prepare( "DESCRIBE {$this->entity}"); |
|
118 | + $stmt = Connect::getInstance()->prepare("DESCRIBE {$this->entity}"); |
|
119 | 119 | $stmt->execute($this->params); |
120 | 120 | return $stmt->fetchAll(PDO::FETCH_COLUMN); |
121 | 121 | } |
@@ -296,9 +296,9 @@ discard block |
||
296 | 296 | */ |
297 | 297 | protected function required(): bool |
298 | 298 | { |
299 | - $data = (array)$this->data(); |
|
299 | + $data = (array) $this->data(); |
|
300 | 300 | foreach ($this->required as $field) { |
301 | - if (empty($data[$field])) { |
|
301 | + if (empty($data[ $field ])) { |
|
302 | 302 | return false; |
303 | 303 | } |
304 | 304 | } |
@@ -310,8 +310,8 @@ discard block |
||
310 | 310 | */ |
311 | 311 | protected function safe(): ?array |
312 | 312 | { |
313 | - $safe = (array)$this->data; |
|
314 | - unset($safe[$this->primary]); |
|
313 | + $safe = (array) $this->data; |
|
314 | + unset($safe[ $this->primary ]); |
|
315 | 315 | return $safe; |
316 | 316 | } |
317 | 317 | |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | protected function toCamelCase(string $string): string |
324 | 324 | { |
325 | 325 | $camelCase = str_replace(' ', '', ucwords(str_replace('_', ' ', $string))); |
326 | - $camelCase[0] = strtolower($camelCase[0]); |
|
326 | + $camelCase[ 0 ] = strtolower($camelCase[ 0 ]); |
|
327 | 327 | return $camelCase; |
328 | 328 | } |
329 | 329 | } |