@@ -50,9 +50,9 @@ |
||
50 | 50 | private static function connectionString(): string |
51 | 51 | { |
52 | 52 | if (DLC["engine"] === "oci") { |
53 | - return "oci:dbname=" . DLC["dbname"] . ";charset=" . DLC["charset"]; |
|
53 | + return "oci:dbname=".DLC["dbname"].";charset=".DLC["charset"]; |
|
54 | 54 | } |
55 | - return DLC["driver"] . ":host=" . DLC["host"] . ";dbname=" . DLC["dbname"] . ";port=" . DLC["port"]; |
|
55 | + return DLC["driver"].":host=".DLC["host"].";dbname=".DLC["dbname"].";port=".DLC["port"]; |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | protected $offset; |
47 | 47 | |
48 | 48 | /** @var \PDOException|null */ |
49 | - protected Exception|PDOException $fail; |
|
49 | + protected Exception | PDOException $fail; |
|
50 | 50 | |
51 | 51 | /** @var object|null */ |
52 | 52 | protected $data; |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | public function fetch(bool $all = false) |
209 | 209 | { |
210 | 210 | try { |
211 | - $stmt = Connect::getInstance()->prepare($this->statement . $this->group . $this->order . $this->limit . $this->offset); |
|
211 | + $stmt = Connect::getInstance()->prepare($this->statement.$this->group.$this->order.$this->limit.$this->offset); |
|
212 | 212 | $stmt->execute($this->params); |
213 | 213 | |
214 | 214 | if (!$stmt->rowCount()) { |
@@ -292,10 +292,10 @@ discard block |
||
292 | 292 | */ |
293 | 293 | protected function required(): bool |
294 | 294 | { |
295 | - $data = (array)$this->data(); |
|
295 | + $data = (array) $this->data(); |
|
296 | 296 | foreach ($this->required as $field) { |
297 | 297 | if (empty($data[$field])) { |
298 | - if(!is_int($data[$field])){ |
|
298 | + if (!is_int($data[$field])) { |
|
299 | 299 | return false; |
300 | 300 | } |
301 | 301 | } |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | */ |
309 | 309 | protected function safe(): ?array |
310 | 310 | { |
311 | - $safe = (array)$this->data; |
|
311 | + $safe = (array) $this->data; |
|
312 | 312 | unset($safe[$this->primary]); |
313 | 313 | return $safe; |
314 | 314 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | |
27 | 27 | try { |
28 | 28 | $columns = implode(", ", array_keys($data)); |
29 | - $values = ":" . implode(", :", array_keys($data)); |
|
29 | + $values = ":".implode(", :", array_keys($data)); |
|
30 | 30 | |
31 | 31 | $stmt = Connect::getInstance()->prepare("INSERT INTO {$this->entity} ({$columns}) VALUES ({$values})"); |
32 | 32 | $stmt->execute($this->filter($data)); |