@@ -8,7 +8,7 @@ |
||
| 8 | 8 | */ |
| 9 | 9 | interface DumpInterface |
| 10 | 10 | { |
| 11 | - public static function parameterToString($object, int $deep=2); |
|
| 11 | + public static function parameterToString($object, int $deep = 2); |
|
| 12 | 12 | public static function dumpThrowable(Throwable $e); |
| 13 | - public static function dumpTrace(array $backtrace, bool $str=true, string $perfix=''); |
|
| 13 | + public static function dumpTrace(array $backtrace, bool $str = true, string $perfix = ''); |
|
| 14 | 14 | } |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | $this->config = $config; |
| 80 | 80 | $this->name = $name ?? 'anonymous'; |
| 81 | 81 | $this->observer = new NullObserver; |
| 82 | - register_shutdown_function(function () { |
|
| 82 | + register_shutdown_function(function() { |
|
| 83 | 83 | $this->onBeforeSystemShutdown(); |
| 84 | 84 | }); |
| 85 | 85 | } |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | try { |
| 108 | 108 | $this->pdo = $this->createPDO(); |
| 109 | 109 | $this->id = static::$connectionCount; |
| 110 | - static::$connectionCount ++; |
|
| 110 | + static::$connectionCount++; |
|
| 111 | 111 | } catch (PDOException $e) { |
| 112 | 112 | throw new SQLException(sprintf( |
| 113 | 113 | "%s connect database error:%s", |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | */ |
| 181 | 181 | public function beginTransaction() |
| 182 | 182 | { |
| 183 | - $this->transaction ++; |
|
| 183 | + $this->transaction++; |
|
| 184 | 184 | if ($this->transaction == 1) { |
| 185 | 185 | $this->pdo->beginTransaction(); |
| 186 | 186 | } |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | { |
| 58 | 58 | if (array_key_exists($name, $this->processor)) { |
| 59 | 59 | if ($this->processor[$name] === ObjectMiddleware::SERIALIZE) { |
| 60 | - return $data === null? $data : serialize($data); |
|
| 60 | + return $data === null ? $data : serialize($data); |
|
| 61 | 61 | } |
| 62 | 62 | if ($this->processor[$name] === ObjectMiddleware::JSON) { |
| 63 | 63 | return json_encode($data); |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | if ($doc = $property->getDocComment()) { |
| 114 | 114 | if (is_string($doc) && preg_match('/@var\s+(\w+)/i', $doc, $match)) { |
| 115 | 115 | $type = strtolower($match[1]); |
| 116 | - if (in_array($type, ['boolean', 'bool', 'integer', 'int' , 'float' , 'double', 'string'])) { |
|
| 116 | + if (in_array($type, ['boolean', 'bool', 'integer', 'int', 'float', 'double', 'string'])) { |
|
| 117 | 117 | return ObjectMiddleware::RAW; |
| 118 | 118 | } |
| 119 | 119 | } |