Completed
Branch feature/pre-split (211a78)
by Anton
05:08
created
source/Spiral/Database/Drivers/SQLite/Schemas/ColumnSchema.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
             $enumValues[] = $this->table->driver()->getPDO()->quote($value);
117 117
         }
118 118
 
119
-        return "$statement CHECK ({$this->getName(true)} IN (" . implode(', ', $enumValues) . '))';
119
+        return "$statement CHECK ({$this->getName(true)} IN (".implode(', ', $enumValues).'))';
120 120
     }
121 121
 
122 122
     /**
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
             }
169 169
         }
170 170
 
171
-        $options = array_map(function ($value) {
171
+        $options = array_map(function($value) {
172 172
             return intval($value);
173 173
         }, explode(',', $options));
174 174
 
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/SQLite/QueryCompiler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
                     $selectColumns[] = "? AS {$this->quote($column)}";
36 36
                 }
37 37
 
38
-                $statement[] = 'SELECT ' . implode(', ', $selectColumns);
38
+                $statement[] = 'SELECT '.implode(', ', $selectColumns);
39 39
             } else {
40
-                $statement[] = 'UNION SELECT ' . trim(str_repeat('?, ', count($columns)), ', ');
40
+                $statement[] = 'UNION SELECT '.trim(str_repeat('?, ', count($columns)), ', ');
41 41
             }
42 42
         }
43 43
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $statement = '';
59 59
 
60 60
         if (!empty($limit) || !empty($offset)) {
61
-            $statement = 'LIMIT ' . ($limit ?: '-1') . ' ';
61
+            $statement = 'LIMIT '.($limit ?: '-1').' ';
62 62
         }
63 63
 
64 64
         if (!empty($offset)) {
Please login to merge, or discard this patch.
source/Spiral/Cache/Stores/FileStore.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -176,6 +176,6 @@
 block discarded – undo
176 176
      */
177 177
     protected function makeFilename($name)
178 178
     {
179
-        return $this->directory . md5($name) . '.' . $this->extension;
179
+        return $this->directory.md5($name).'.'.$this->extension;
180 180
     }
181 181
 }
Please login to merge, or discard this patch.
source/Spiral/Debug/Dumper.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 
130 130
         if (!$hideHeader && !empty($name)) {
131 131
             //Showing element name (if any provided)
132
-            $header = $indent . $this->style->style($name, 'name');
132
+            $header = $indent.$this->style->style($name, 'name');
133 133
 
134 134
             //Showing equal sing
135 135
             $header .= $this->style->style(' = ', 'syntax', '=');
@@ -139,24 +139,24 @@  discard block
 block discarded – undo
139 139
 
140 140
         if ($level > $this->maxLevel) {
141 141
             //Dumper is not reference based, we can't dump too deep values
142
-            return $indent . $this->style->style('-too deep-', 'maxLevel') . "\n";
142
+            return $indent.$this->style->style('-too deep-', 'maxLevel')."\n";
143 143
         }
144 144
 
145 145
         $type = strtolower(gettype($value));
146 146
 
147 147
         if ($type == 'array') {
148
-            return $header . $this->dumpArray($value, $level, $hideHeader);
148
+            return $header.$this->dumpArray($value, $level, $hideHeader);
149 149
         }
150 150
 
151 151
         if ($type == 'object') {
152
-            return $header . $this->dumpObject($value, $level, $hideHeader);
152
+            return $header.$this->dumpObject($value, $level, $hideHeader);
153 153
         }
154 154
 
155 155
         if ($type == 'resource') {
156 156
             //No need to dump resource value
157
-            $element = get_resource_type($value) . ' resource ';
157
+            $element = get_resource_type($value).' resource ';
158 158
 
159
-            return $header . $this->style->style($element, 'type', 'resource') . "\n";
159
+            return $header.$this->style->style($element, 'type', 'resource')."\n";
160 160
         }
161 161
 
162 162
         //Value length
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
         }
184 184
 
185 185
         //Including value
186
-        return $header . ' ' . $this->style->style($element, 'value', $type) . "\n";
186
+        return $header.' '.$this->style->style($element, 'value', $type)."\n";
187 187
     }
188 188
 
189 189
     /**
@@ -201,8 +201,8 @@  discard block
 block discarded – undo
201 201
             $count = count($array);
202 202
 
203 203
             //Array size and scope
204
-            $output = $this->style->style("array({$count})", 'type', 'array') . "\n";
205
-            $output .= $indent . $this->style->style('[', 'syntax', '[') . "\n";
204
+            $output = $this->style->style("array({$count})", 'type', 'array')."\n";
205
+            $output .= $indent.$this->style->style('[', 'syntax', '[')."\n";
206 206
         } else {
207 207
             $output = '';
208 208
         }
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 
222 222
         if (!$hideHeader) {
223 223
             //Closing array scope
224
-            $output .= $indent . $this->style->style(']', 'syntax', ']') . "\n";
224
+            $output .= $indent.$this->style->style(']', 'syntax', ']')."\n";
225 225
         }
226 226
 
227 227
         return $output;
@@ -240,10 +240,10 @@  discard block
 block discarded – undo
240 240
         $indent = $this->style->indent($level);
241 241
 
242 242
         if (!$hideHeader) {
243
-            $type = ($class ?: get_class($object)) . ' object ';
243
+            $type = ($class ?: get_class($object)).' object ';
244 244
 
245
-            $header = $this->style->style($type, 'type', 'object') . "\n";
246
-            $header .= $indent . $this->style->style('(', 'syntax', '(') . "\n";
245
+            $header = $this->style->style($type, 'type', 'object')."\n";
246
+            $header .= $indent.$this->style->style('(', 'syntax', '(')."\n";
247 247
         } else {
248 248
             $header = '';
249 249
         }
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 
265 265
             return $header
266 266
             . $this->dumpValue($debugInfo, '', $level + (is_scalar($object)), true)
267
-            . $indent . $this->style->style(')', 'syntax', ')') . "\n";
267
+            . $indent.$this->style->style(')', 'syntax', ')')."\n";
268 268
         }
269 269
 
270 270
         if ($object instanceof \Closure) {
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
         }
281 281
 
282 282
         //Header, content, footer
283
-        return $header . $output . $indent . $this->style->style(')', 'syntax', ')') . "\n";
283
+        return $header.$output.$indent.$this->style->style(')', 'syntax', ')')."\n";
284 284
     }
285 285
 
286 286
     /**
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
         }
317 317
 
318 318
         //Property name includes access level
319
-        $name = $property->getName() . $this->style->style(':' . $access, 'access', $access);
319
+        $name = $property->getName().$this->style->style(':'.$access, 'access', $access);
320 320
 
321 321
         return $this->dumpValue($property->getValue($object), $name, $level + 1);
322 322
     }
Please login to merge, or discard this patch.
source/Spiral/ORM/Entities/RecordMapper.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -881,7 +881,7 @@
 block discarded – undo
881 881
      * Parse single result row to generate data tree. Must pass parsing to evert nested loader.
882 882
      *
883 883
      * @param array $row
884
-     * @return bool
884
+     * @return boolean|null
885 885
      */
886 886
     private function parseRow(array $row)
887 887
     {
Please login to merge, or discard this patch.
source/Spiral/ORM/RecordEntity.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -144,8 +144,8 @@  discard block
 block discarded – undo
144 144
      *
145 145
      * @see Record::$indexes
146 146
      */
147
-    const INDEX  = 1000;            //Default index type
148
-    const UNIQUE = 2000;            //Unique index definition
147
+    const INDEX  = 1000; //Default index type
148
+    const UNIQUE = 2000; //Unique index definition
149 149
 
150 150
     /**
151 151
      * Indicates that record data were loaded from database (not recently created).
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
     public function setField($name, $value, $filter = true)
351 351
     {
352 352
         if (!$this->hasField($name)) {
353
-            throw new FieldException("Undefined field '{$name}' in '" . static::class . "'");
353
+            throw new FieldException("Undefined field '{$name}' in '".static::class."'");
354 354
         }
355 355
 
356 356
         //Original field value
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
     public function getField($name, $default = null, $filter = true)
379 379
     {
380 380
         if (!$this->hasField($name)) {
381
-            throw new FieldException("Undefined field '{$name}' in '" . static::class . "'");
381
+            throw new FieldException("Undefined field '{$name}' in '".static::class."'");
382 382
         }
383 383
 
384 384
         $value = parent::getField($name, $default, false);
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
     public function __debugInfo()
584 584
     {
585 585
         $info = [
586
-            'table'  => $this->ormSchema[ORMInterface::M_DB] . '/' . $this->ormSchema[ORMInterface::M_TABLE],
586
+            'table'  => $this->ormSchema[ORMInterface::M_DB].'/'.$this->ormSchema[ORMInterface::M_TABLE],
587 587
             'fields' => $this->getFields(),
588 588
             'errors' => $this->getErrors(),
589 589
         ];
@@ -727,7 +727,7 @@  discard block
 block discarded – undo
727 727
     {
728 728
         if (!isset($this->ormSchema[ORMInterface::M_RELATIONS][$name])) {
729 729
             throw new RecordException(
730
-                "Undefined relation {$name} in record " . static::class . '.'
730
+                "Undefined relation {$name} in record ".static::class.'.'
731 731
             );
732 732
         }
733 733
 
Please login to merge, or discard this patch.
source/Spiral/ORM/Entities/EntityCache.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
             throw new CacheException('Entity cache size exceeded');
88 88
         }
89 89
 
90
-        return $this->data[get_class($entity) . '.' . $entity->primaryKey()] = $entity;
90
+        return $this->data[get_class($entity).'.'.$entity->primaryKey()] = $entity;
91 91
     }
92 92
 
93 93
     /**
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
             return;
102 102
         }
103 103
 
104
-        unset($this->data[get_class($entity) . '.' . $entity->primaryKey()]);
104
+        unset($this->data[get_class($entity).'.'.$entity->primaryKey()]);
105 105
     }
106 106
 
107 107
     /**
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      */
115 115
     public function has($class, $primaryKey)
116 116
     {
117
-        return isset($this->data[$class . '.' . $primaryKey]);
117
+        return isset($this->data[$class.'.'.$primaryKey]);
118 118
     }
119 119
 
120 120
     /**
@@ -127,11 +127,11 @@  discard block
 block discarded – undo
127 127
      */
128 128
     public function get($class, $primaryKey)
129 129
     {
130
-        if (empty($this->data[$class . '.' . $primaryKey])) {
130
+        if (empty($this->data[$class.'.'.$primaryKey])) {
131 131
             return null;
132 132
         }
133 133
 
134
-        return $this->data[$class . '.' . $primaryKey];
134
+        return $this->data[$class.'.'.$primaryKey];
135 135
     }
136 136
 
137 137
     /**
Please login to merge, or discard this patch.
inprocess/ORM.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -176,6 +176,7 @@
 block discarded – undo
176 176
 
177 177
     /**
178 178
      * {@inheritdoc}
179
+     * @param string $container
179 180
      */
180 181
     public function loader($type, $container, array $definition, Loader $parent = null)
181 182
     {
Please login to merge, or discard this patch.
moving/ORM/Entities/Relation.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -330,7 +330,7 @@
 block discarded – undo
330 330
      * Perform iterator on pre-loaded data. Use relation selector to iterate thought custom relation
331 331
      * query.
332 332
      *
333
-     * @return RecordEntity|RecordEntity[]|RecordIterator
333
+     * @return null|EntityInterface
334 334
      */
335 335
     public function getIterator()
336 336
     {
Please login to merge, or discard this patch.