@@ -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)) { |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | public function pushRaw($payload, $queue = null, array $options = []) |
| 51 | 51 | { |
| 52 | 52 | //wiki https://wiki.swoole.com/wiki/page/134.html, task($data,$dst_worker_id), $dst_worker_id should be default -1 |
| 53 | - return $this->swoole->task($payload, (!is_numeric($queue) || $queue < 0) ? -1 : (int)$queue); |
|
| 53 | + return $this->swoole->task($payload, (!is_numeric($queue) || $queue < 0) ? -1 : (int) $queue); |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | /** |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | */ |
| 65 | 65 | public function later($delay, $job, $data = '', $queue = null) |
| 66 | 66 | { |
| 67 | - return Timer::after($this->secondsUntil($delay) * 1000, function () use ($job, $data, $queue) { |
|
| 67 | + return Timer::after($this->secondsUntil($delay) * 1000, function() use ($job, $data, $queue) { |
|
| 68 | 68 | return $this->push($job, $data, $queue); |
| 69 | 69 | }); |
| 70 | 70 | } |