Passed
Push — dev ( ff6166...78e864 )
by 世昌
02:16
created
suda/src/framework/session/PHPSession.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
     public function get(string $name = null, $default = null)
111 111
     {
112 112
         if ($name !== null) {
113
-            return $this->has($name) ?$_SESSION[$name]:$default;
113
+            return $this->has($name) ? $_SESSION[$name] : $default;
114 114
         } else {
115 115
             return $_SESSION;
116 116
         }
Please login to merge, or discard this patch.
suda/src/framework/debug/attach/DumpInterface.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
suda/src/database/connection/Connection.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
suda/src/database/middleware/ObjectMiddleware.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
             }
Please login to merge, or discard this patch.