@@ -94,9 +94,9 @@ discard block |
||
| 94 | 94 | */ |
| 95 | 95 | public function getConnect() |
| 96 | 96 | { |
| 97 | - if (! $this->isConnected()) { |
|
| 97 | + if (!$this->isConnected()) { |
|
| 98 | 98 | $this->connect(); |
| 99 | - if (! $this->conn->getPdo() instanceof PDO) { |
|
| 99 | + if (!$this->conn->getPdo() instanceof PDO) { |
|
| 100 | 100 | $this->conn->reconnect(); |
| 101 | 101 | } |
| 102 | 102 | } |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | public function connect() |
| 139 | 139 | { |
| 140 | 140 | try { |
| 141 | - if (! $this->hasConnectionName($this->connection)) { |
|
| 141 | + if (!$this->hasConnectionName($this->connection)) { |
|
| 142 | 142 | $this->getCapsule()->addConnection([ |
| 143 | 143 | 'driver' => $this->driver, |
| 144 | 144 | 'host' => $this->getConfig('host'), |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | |
| 215 | 215 | $query = $method . ' ' . $charset; |
| 216 | 216 | |
| 217 | - return (bool)$this->query($query); |
|
| 217 | + return (bool) $this->query($query); |
|
| 218 | 218 | } |
| 219 | 219 | |
| 220 | 220 | /** |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | $result = $this->prepare($sql); |
| 250 | 250 | $this->execute($result); |
| 251 | 251 | |
| 252 | - if ($this->saveAffectedRows($result) === 0 && $this->isResult($result) && ! $this->isSelectQuery($sql)) { |
|
| 252 | + if ($this->saveAffectedRows($result) === 0 && $this->isResult($result) && !$this->isSelectQuery($sql)) { |
|
| 253 | 253 | $result = true; |
| 254 | 254 | } |
| 255 | 255 | } catch (\Exception $exception) { |
@@ -362,7 +362,7 @@ discard block |
||
| 362 | 362 | */ |
| 363 | 363 | public function execute($result) |
| 364 | 364 | { |
| 365 | - return $this->isResult($result) ? $result->execute() : (bool)$result; |
|
| 365 | + return $this->isResult($result) ? $result->execute() : (bool) $result; |
|
| 366 | 366 | } |
| 367 | 367 | |
| 368 | 368 | /** |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | */ |
| 30 | 30 | public function getLastErrorNo() |
| 31 | 31 | { |
| 32 | - return (string)$this->getDriver()->getLastErrorNo(); |
|
| 32 | + return (string) $this->getDriver()->getLastErrorNo(); |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | /** |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | public function getTableMetaData($table) |
| 264 | 264 | { |
| 265 | 265 | $metadata = []; |
| 266 | - if (! empty($table)) { |
|
| 266 | + if (!empty($table)) { |
|
| 267 | 267 | $sql = 'SHOW FIELDS FROM ' . $table; |
| 268 | 268 | $result = $this->query($sql); |
| 269 | 269 | $metadata = $this->getDriver()->getTableMetaData($result); |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | */ |
| 286 | 286 | public function setDriver($driver) |
| 287 | 287 | { |
| 288 | - if (! \in_array(Interfaces\DriverInterface::class, class_implements($driver), true)) { |
|
| 288 | + if (!\in_array(Interfaces\DriverInterface::class, class_implements($driver), true)) { |
|
| 289 | 289 | throw new Exceptions\DriverException( |
| 290 | 290 | $driver . ' should implements the ' . Interfaces\DriverInterface::class |
| 291 | 291 | ); |
@@ -378,7 +378,7 @@ discard block |
||
| 378 | 378 | $table = $this->prepareFrom($table); |
| 379 | 379 | $useFields = \is_array($fields) ? $this->prepareValues($fields) : $fields; |
| 380 | 380 | |
| 381 | - if (empty($useFields) || ! \is_scalar($useFields) || $useFields === '*') { |
|
| 381 | + if (empty($useFields) || !\is_scalar($useFields) || $useFields === '*') { |
|
| 382 | 382 | throw (new Exceptions\InvalidFieldException('Invalid insert fields')) |
| 383 | 383 | ->setData($fields); |
| 384 | 384 | } |
@@ -417,7 +417,7 @@ discard block |
||
| 417 | 417 | $table = $this->prepareFrom($table); |
| 418 | 418 | $useFields = \is_array($fields) ? $this->prepareFields($fields, true) : $fields; |
| 419 | 419 | |
| 420 | - if (empty($useFields) || ! \is_scalar($useFields) || $useFields === '*') { |
|
| 420 | + if (empty($useFields) || !\is_scalar($useFields) || $useFields === '*') { |
|
| 421 | 421 | throw (new Exceptions\InvalidFieldException('Invalid insert fields')) |
| 422 | 422 | ->setData($fields); |
| 423 | 423 | } |