@@ -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\DriverException( |
| 58 | 58 | $driver . ' should implements the ' . Interfaces\DriverInterface::class |
| 59 | 59 | ); |
@@ -271,13 +271,12 @@ discard block |
||
| 271 | 271 | |
| 272 | 272 | if (\is_array($fields)) { |
| 273 | 273 | $useFields = empty($fromTable) ? |
| 274 | - $this->prepareValues($fields) : |
|
| 275 | - $this->prepareFields($fields, true); |
|
| 274 | + $this->prepareValues($fields) : $this->prepareFields($fields, true); |
|
| 276 | 275 | } else { |
| 277 | 276 | $useFields = $fields; |
| 278 | 277 | } |
| 279 | 278 | |
| 280 | - if (empty($useFields) || ! \is_scalar($useFields) || ($useFields === '*' && ! empty($fromTable))) { |
|
| 279 | + if (empty($useFields) || !\is_scalar($useFields) || ($useFields === '*' && !empty($fromTable))) { |
|
| 281 | 280 | throw (new Exceptions\InvalidFieldException('Invalid insert fields')) |
| 282 | 281 | ->setData($fields); |
| 283 | 282 | } |
@@ -353,7 +352,7 @@ discard block |
||
| 353 | 352 | * @param int $col |
| 354 | 353 | * @return string|null |
| 355 | 354 | */ |
| 356 | - public function fieldName($result, $col = 0) :? string |
|
| 355 | + public function fieldName($result, $col = 0) : ? string |
|
| 357 | 356 | { |
| 358 | 357 | return $this->getDriver()->fieldName($result, $col); |
| 359 | 358 | } |
@@ -468,7 +467,7 @@ discard block |
||
| 468 | 467 | public function getTableMetaData(string $table) : array |
| 469 | 468 | { |
| 470 | 469 | $metadata = []; |
| 471 | - if (! empty($table)) { |
|
| 470 | + if (!empty($table)) { |
|
| 472 | 471 | $sql = 'SHOW FIELDS FROM ' . $table; |
| 473 | 472 | $result = $this->query($sql); |
| 474 | 473 | $metadata = $this->getDriver()->getTableMetaData($result); |