@@ -77,7 +77,7 @@ |
||
77 | 77 | * @param int $col |
78 | 78 | * @return null|string |
79 | 79 | */ |
80 | - public function fieldName($result, $col = 0) :? string; |
|
80 | + public function fieldName($result, $col = 0) : ? string; |
|
81 | 81 | |
82 | 82 | /** |
83 | 83 | * @param string $name |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | 'method' |
54 | 54 | )); |
55 | 55 | |
56 | - if (! \in_array(Interfaces\DriverInterface::class, class_implements($driver), true)) { |
|
56 | + if (!\in_array(Interfaces\DriverInterface::class, class_implements($driver), true)) { |
|
57 | 57 | throw new Exceptions\Exception( |
58 | 58 | $driver . ' should implements the ' . Interfaces\DriverInterface::class |
59 | 59 | ); |
@@ -286,13 +286,12 @@ discard block |
||
286 | 286 | |
287 | 287 | if (\is_array($fields)) { |
288 | 288 | $useFields = empty($fromTable) ? |
289 | - $this->prepareValues($fields) : |
|
290 | - $this->prepareFields($fields, true); |
|
289 | + $this->prepareValues($fields) : $this->prepareFields($fields, true); |
|
291 | 290 | } else { |
292 | 291 | $useFields = $fields; |
293 | 292 | } |
294 | 293 | |
295 | - if (empty($useFields) || ! \is_scalar($useFields) || ($useFields === '*' && ! empty($fromTable))) { |
|
294 | + if (empty($useFields) || !\is_scalar($useFields) || ($useFields === '*' && !empty($fromTable))) { |
|
296 | 295 | throw (new Exceptions\InvalidFieldException('Invalid insert fields')) |
297 | 296 | ->setData($fields); |
298 | 297 | } |
@@ -368,7 +367,7 @@ discard block |
||
368 | 367 | * @param int $col |
369 | 368 | * @return string|null |
370 | 369 | */ |
371 | - public function fieldName($result, $col = 0) :? string |
|
370 | + public function fieldName($result, $col = 0) : ? string |
|
372 | 371 | { |
373 | 372 | return $this->getDriver()->fieldName($result, $col); |
374 | 373 | } |
@@ -483,7 +482,7 @@ discard block |
||
483 | 482 | public function getTableMetaData(string $table) : array |
484 | 483 | { |
485 | 484 | $metadata = []; |
486 | - if (! empty($table)) { |
|
485 | + if (!empty($table)) { |
|
487 | 486 | $sql = 'SHOW FIELDS FROM ' . $table; |
488 | 487 | $result = $this->query($sql); |
489 | 488 | $metadata = $this->getDriver()->getTableMetaData($result); |
@@ -22,9 +22,9 @@ |
||
22 | 22 | protected $timeFormat = '%2.5f'; |
23 | 23 | |
24 | 24 | /** |
25 | - * @return mixed |
|
25 | + * @return mixed |
|
26 | 26 | * @throws Exceptions\Exception |
27 | - */ |
|
27 | + */ |
|
28 | 28 | abstract public function getDriver(); |
29 | 29 | |
30 | 30 | /** |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | */ |
37 | 37 | public function getConnect() |
38 | 38 | { |
39 | - if (! $this->isConnected()) { |
|
39 | + if (!$this->isConnected()) { |
|
40 | 40 | return $this->connect(); |
41 | 41 | } |
42 | 42 | |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | throw new Exceptions\ConnectException($this->conn->connect_error); |
62 | 62 | } |
63 | 63 | |
64 | - if (! $this->isConnected()) { |
|
64 | + if (!$this->isConnected()) { |
|
65 | 65 | throw new Exceptions\ConnectException( |
66 | 66 | $this->getLastError() ?: 'Failed to create the database connection!' |
67 | 67 | ); |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | * @param int $col |
177 | 177 | * @return string|null |
178 | 178 | */ |
179 | - public function fieldName($result, $col = 0) :? string |
|
179 | + public function fieldName($result, $col = 0) : ? string |
|
180 | 180 | { |
181 | 181 | $field = $result->fetch_field_direct($col); |
182 | 182 |