Passed
Push — master ( 9bc88c...903b03 )
by 世昌
02:14
created
suda/src/orm/middleware/ObjectMiddleware.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     public function input(string $name, $data)
51 51
     {
52 52
         if (array_key_exists($name, $this->processor) && $this->processor[$name] === ObjectMiddleware::SERIALIZE) {
53
-            return $data === null? $data : \serialize($data);
53
+            return $data === null ? $data : \serialize($data);
54 54
         }
55 55
         return $data;
56 56
     }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         if ($doc = $property->getDocComment()) {
97 97
             if (is_string($doc) && preg_match('/@var\s+(\w+)/i', $doc, $match)) {
98 98
                 $type = \strtolower($match[1]);
99
-                if (\in_array($type, ['boolean', 'bool', 'integer', 'int' , 'float' , 'double', 'string'])) {
99
+                if (\in_array($type, ['boolean', 'bool', 'integer', 'int', 'float', 'double', 'string'])) {
100 100
                     return ObjectMiddleware::RAW;
101 101
                 }
102 102
             }
Please login to merge, or discard this patch.
suda/src/orm/struct/TableStructMiddleware.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
     protected function prepareProcessorSet(string $object)
61 61
     {
62 62
         $reflectObject = new ReflectionClass($object);
63
-        $classDoc = $reflectObject->getDocComment()?:'';
63
+        $classDoc = $reflectObject->getDocComment() ?: '';
64 64
         $field = TableClassStructBuilder::readClassDocField($classDoc);
65 65
         if ($field !== null) {
66 66
             $this->createProccorFromStruct();
Please login to merge, or discard this patch.
suda/src/orm/struct/TableStructBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@
 block discarded – undo
139 139
             if (is_string($doc) && preg_match('/@field\s+(\w+)(?:\((.+?)\))?\s+(.+)?$/im', $doc, $match)) {
140 140
                 $type = strtoupper($match[1]);
141 141
                 $length = static::parseLength($match[2] ?? '');
142
-                return [$type, $length , trim($match[3] ?? '')];
142
+                return [$type, $length, trim($match[3] ?? '')];
143 143
             }
144 144
         }
145 145
         return ['text', null, ''];
Please login to merge, or discard this patch.
suda/src/orm/struct/TableClassStructBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
      * @param strring $classDoc
62 62
      * @return array|null
63 63
      */
64
-    public static function readClassDocField(string $classDoc):?array
64
+    public static function readClassDocField(string $classDoc): ?array
65 65
     {
66 66
         if (preg_match_all('/@field\s+(\w+)\s+(\w+)(?:\((.+?)\))?\s+(.+)?$/im', $classDoc, $match)) {
67 67
             return $match;
Please login to merge, or discard this patch.
suda/src/orm/DataAccess.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -251,7 +251,7 @@
 block discarded – undo
251 251
     protected function createDefaultMiddleware(string $object, TableStruct $struct)
252 252
     {
253 253
         $reflectObject = new ReflectionClass($object);
254
-        $classDoc = $reflectObject->getDocComment()?:'';
254
+        $classDoc = $reflectObject->getDocComment() ?: '';
255 255
         if (\preg_match('/@field-serialize\s+(\w+)/i', $classDoc, $matchs)) {
256 256
             return new TableStructMiddleware($object, $struct);
257 257
         }
Please login to merge, or discard this patch.