@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | { |
| 57 | 57 | $this->client->connect($options); |
| 58 | 58 | |
| 59 | - if (! $this->client->connected) { |
|
| 59 | + if (!$this->client->connected) { |
|
| 60 | 60 | $message = $this->client->connect_error ?: $this->client->error; |
| 61 | 61 | $errorCode = $this->client->connect_errno ?: $this->client->errno; |
| 62 | 62 | |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | public static function checkDriver(string $driver) |
| 103 | 103 | { |
| 104 | - if (! in_array($driver, static::getAvailableDrivers())) { |
|
| 104 | + if (!in_array($driver, static::getAvailableDrivers())) { |
|
| 105 | 105 | throw new \InvalidArgumentException("{$driver} driver is not supported yet."); |
| 106 | 106 | } |
| 107 | 107 | } |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | public function commit() |
| 127 | 127 | { |
| 128 | 128 | $this->client->commit(); |
| 129 | - $this->inTransaction = false;//TODO I think it's sample to rollback, please confirm it |
|
| 129 | + $this->inTransaction = false; //TODO I think it's sample to rollback, please confirm it |
|
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | public function inTransaction() |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | $bindKeyMap = []; |
| 186 | 186 | $statement = preg_replace_callback( |
| 187 | 187 | '/:([a-zA-Z_]\w*?)\b/', |
| 188 | - function ($matches) use (&$i, &$bindKeyMap) { |
|
| 188 | + function($matches) use (&$i, &$bindKeyMap) { |
|
| 189 | 189 | $bindKeyMap[$matches[1]] = $i++; |
| 190 | 190 | |
| 191 | 191 | return '?'; |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | public function bindParam($parameter, &$variable, $type = null, $maxlen = null, $driverdata = null) |
| 50 | 50 | { |
| 51 | - if (! is_string($parameter) && ! is_int($parameter)) { |
|
| 51 | + if (!is_string($parameter) && !is_int($parameter)) { |
|
| 52 | 52 | return false; |
| 53 | 53 | } |
| 54 | 54 | |
@@ -60,12 +60,12 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | public function bindValue($parameter, $variable, $type = null) |
| 62 | 62 | { |
| 63 | - if (! is_string($parameter) && ! is_int($parameter)) { |
|
| 63 | + if (!is_string($parameter) && !is_int($parameter)) { |
|
| 64 | 64 | return false; |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | if (is_object($variable)) { |
| 68 | - if (! method_exists($variable, '__toString')) { |
|
| 68 | + if (!method_exists($variable, '__toString')) { |
|
| 69 | 69 | return false; |
| 70 | 70 | } else { |
| 71 | 71 | $variable = (string) $variable; |
@@ -86,14 +86,14 @@ discard block |
||
| 86 | 86 | |
| 87 | 87 | public function execute($inputParameters = null) |
| 88 | 88 | { |
| 89 | - if (! empty($inputParameters)) { |
|
| 89 | + if (!empty($inputParameters)) { |
|
| 90 | 90 | foreach ($inputParameters as $key => $value) { |
| 91 | 91 | $this->bindParam($key, $value); |
| 92 | 92 | } |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | $inputParameters = []; |
| 96 | - if (! empty($this->statement->bindKeyMap)) { |
|
| 96 | + if (!empty($this->statement->bindKeyMap)) { |
|
| 97 | 97 | foreach ($this->statement->bindKeyMap as $nameKey => $numKey) { |
| 98 | 98 | if (isset($this->bindMap[$nameKey])) { |
| 99 | 99 | $inputParameters[$numKey] = $this->bindMap[$nameKey]; |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | //if not, the DB::connection('mysql-coroutine')->transaction(func,times) won't be work well, |
| 111 | 111 | //and if one sql occur error, others will be execute success, it doesn't rollback, |
| 112 | 112 | //also please confirm it, Thank you |
| 113 | - if($result === false){ |
|
| 113 | + if ($result === false) { |
|
| 114 | 114 | throw new \PDOException($this->errorInfo(), $this->errorCode()); |
| 115 | 115 | } |
| 116 | 116 | |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | $fetchArgument = null, |
| 153 | 153 | $ctorArgs = null |
| 154 | 154 | ) { |
| 155 | - if (! is_array($rawData)) { |
|
| 155 | + if (!is_array($rawData)) { |
|
| 156 | 156 | return false; |
| 157 | 157 | } |
| 158 | 158 | if (empty($rawData)) { |