Completed
Branch feature/pre-split (58adfb)
by Anton
08:24
created
source/Spiral/ODM/Entities/SchemaBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 
176 176
         //Pre-packing collections
177 177
         foreach ($this->getCollections() as $collection) {
178
-            $name = $collection->getDatabase() . '/' . $collection->getName();
178
+            $name = $collection->getDatabase().'/'.$collection->getName();
179 179
             $result[$name] = $collection->getParent()->getName();
180 180
         }
181 181
 
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
             }
292 292
 
293 293
             //Getting fully specified collection name (with specified db)
294
-            $collection = $document->getDatabase() . '/' . $document->getCollection();
294
+            $collection = $document->getDatabase().'/'.$document->getCollection();
295 295
             if (isset($this->collections[$collection])) {
296 296
                 //Already described by parent
297 297
                 continue;
Please login to merge, or discard this patch.
source/Spiral/ODM/Entities/Schemas/DocumentSchema.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -317,7 +317,7 @@
 block discarded – undo
317 317
             if (
318 318
                 is_array($type)
319 319
                 && is_scalar($type[0])
320
-                && $filter = $this->builder->getMutators('array::' . $type[0])
320
+                && $filter = $this->builder->getMutators('array::'.$type[0])
321 321
             ) {
322 322
                 //Mutator associated to array with specified type
323 323
                 $resolved += $filter;
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     /**
62 62
      * Related source class.
63 63
      *
64
-     * @return string|null
64
+     * @return string
65 65
      */
66 66
     public function getSource()
67 67
     {
@@ -553,7 +553,7 @@  discard block
 block discarded – undo
553 553
      * @param DocumentSchema $childA
554 554
      * @param DocumentSchema $childB
555 555
      *
556
-     * @return int
556
+     * @return boolean
557 557
      */
558 558
     private function sortChildren(DocumentSchema $childA, DocumentSchema $childB)
559 559
     {
Please login to merge, or discard this patch.
source/Spiral/ODM/Entities/Compositor.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -348,7 +348,7 @@
 block discarded – undo
348 348
 
349 349
                 $atomics = array_merge(
350 350
                     $atomics,
351
-                    $document->buildAtomics(($container ? $container . '.' : '') . $offset)
351
+                    $document->buildAtomics(($container ? $container.'.' : '').$offset)
352 352
                 );
353 353
             }
354 354
         }
Please login to merge, or discard this patch.
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     /**
143 143
      * Get composition parent.
144 144
      *
145
-     * @return EntityInterface|DocumentEntity|null
145
+     * @return EntityInterface
146 146
      */
147 147
     public function getParent()
148 148
     {
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
     /**
495 495
      * {@inheritdoc}
496 496
      *
497
-     * @return DocumentEntity[]
497
+     * @return \ArrayIterator
498 498
      */
499 499
     public function getIterator()
500 500
     {
@@ -590,7 +590,7 @@  discard block
 block discarded – undo
590 590
      * Example:
591 591
      * $user->cards->findOne(['active' => true]);
592 592
      *
593
-     * @param array|DocumentEntity $query
593
+     * @param DocumentEntity $query
594 594
      *
595 595
      * @return null|DocumentEntity
596 596
      */
@@ -610,7 +610,7 @@  discard block
 block discarded – undo
610 610
      * @param DocumentEntity $document
611 611
      * @param bool           $resetState Set to true to reset compositor solid state.
612 612
      *
613
-     * @return $this|DocumentEntity[]
613
+     * @return Compositor
614 614
      *
615 615
      * @throws CompositorException
616 616
      */
@@ -647,7 +647,7 @@  discard block
 block discarded – undo
647 647
      * @param array|DocumentEntity $query
648 648
      * @param bool                 $resetState Set to true to reset compositor solid state.
649 649
      *
650
-     * @return $this|DocumentEntity[]
650
+     * @return Compositor
651 651
      *
652 652
      * @throws CompositorException
653 653
      */
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
      * @param DocumentEntity $document
696 696
      * @param bool           $resetState Set to true to reset compositor solid state.
697 697
      *
698
-     * @return $this|DocumentEntity[]
698
+     * @return Compositor
699 699
      *
700 700
      * @throws CompositorException
701 701
      */
Please login to merge, or discard this patch.
source/Spiral/Storage/Servers/LocalServer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -190,11 +190,11 @@
 block discarded – undo
190 190
     protected function getPath(BucketInterface $bucket, $name)
191 191
     {
192 192
         if (empty($this->options['home'])) {
193
-            return $this->files->normalizePath($bucket->getOption('directory') . $name);
193
+            return $this->files->normalizePath($bucket->getOption('directory').$name);
194 194
         }
195 195
 
196 196
         return $this->files->normalizePath(
197
-            $this->options['home'] . '/' . $bucket->getOption('directory') . $name
197
+            $this->options['home'].'/'.$bucket->getOption('directory').$name
198 198
         );
199 199
     }
200 200
 }
201 201
\ No newline at end of file
Please login to merge, or discard this patch.
source/Spiral/Storage/Servers/RackspaceServer.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -83,11 +83,11 @@  discard block
 block discarded – undo
83 83
 
84 84
         if ($this->options['cache']) {
85 85
             $this->authToken = $this->store->get(
86
-                $this->options['username'] . '@rackspace-token'
86
+                $this->options['username'].'@rackspace-token'
87 87
             );
88 88
 
89 89
             $this->regions = (array)$this->store->get(
90
-                $this->options['username'] . '@rackspace-regions'
90
+                $this->options['username'].'@rackspace-regions'
91 91
             );
92 92
         }
93 93
 
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
     {
226 226
         try {
227 227
             $request = $this->buildRequest('PUT', $bucket, $newname, [
228
-                'X-Copy-From'    => '/' . $bucket->getOption('container') . '/' . rawurlencode($oldname),
228
+                'X-Copy-From'    => '/'.$bucket->getOption('container').'/'.rawurlencode($oldname),
229 229
                 'Content-Length' => 0
230 230
             ]);
231 231
 
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 
263 263
         try {
264 264
             $request = $this->buildRequest('PUT', $destination, $name, [
265
-                'X-Copy-From'    => '/' . $bucket->getOPtion('container') . '/' . rawurlencode($name),
265
+                'X-Copy-From'    => '/'.$bucket->getOPtion('container').'/'.rawurlencode($name),
266 266
                 'Content-Length' => 0
267 267
             ]);
268 268
 
@@ -339,13 +339,13 @@  discard block
 block discarded – undo
339 339
 
340 340
         if ($this->options['cache']) {
341 341
             $this->store->set(
342
-                $this->options['username'] . '@rackspace-token',
342
+                $this->options['username'].'@rackspace-token',
343 343
                 $this->authToken,
344 344
                 $this->options['lifetime']
345 345
             );
346 346
 
347 347
             $this->store->set(
348
-                $this->options['username'] . '@rackspace-regions',
348
+                $this->options['username'].'@rackspace-regions',
349 349
                 $this->regions,
350 350
                 $this->options['lifetime']
351 351
             );
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
         }
384 384
 
385 385
         return new Uri(
386
-            $this->regions[$region] . '/' . $bucket->getOption('container') . '/' . rawurlencode($name)
386
+            $this->regions[$region].'/'.$bucket->getOption('container').'/'.rawurlencode($name)
387 387
         );
388 388
     }
389 389
 
Please login to merge, or discard this patch.
source/Spiral/Storage/Servers/AmazonServer.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
     protected function buildUri(BucketInterface $bucket, $name)
215 215
     {
216 216
         return new Uri(
217
-            $this->options['server'] . '/' . $bucket->getOption('bucket') . '/' . rawurlencode($name)
217
+            $this->options['server'].'/'.$bucket->getOption('bucket').'/'.rawurlencode($name)
218 218
         );
219 219
     }
220 220
 
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
     {
260 260
         $headers = [];
261 261
         foreach ($commands as $command => $value) {
262
-            $headers['X-Amz-' . $command] = $value;
262
+            $headers['X-Amz-'.$command] = $value;
263 263
         }
264 264
 
265 265
         return $headers;
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
         $normalizedCommands = [];
286 286
         foreach ($packedCommands as $command => $value) {
287 287
             if (!empty($value)) {
288
-                $normalizedCommands[] = strtolower($command) . ':' . $value;
288
+                $normalizedCommands[] = strtolower($command).':'.$value;
289 289
             }
290 290
         }
291 291
 
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
 
299 299
         return $request->withAddedHeader(
300 300
             'Authorization',
301
-            'AWS ' . $this->options['accessKey'] . ':' . base64_encode(
301
+            'AWS '.$this->options['accessKey'].':'.base64_encode(
302 302
                 hash_hmac('sha1', join("\n", $signature), $this->options['secretKey'], true)
303 303
             )
304 304
         );
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
 
323 323
         if (!empty($maxAge = $bucket->getOption('maxAge', 0))) {
324 324
             //Shortcut
325
-            $headers['Cache-control'] = 'max-age=' . $bucket->getOption('maxAge', 0) . ', public';
325
+            $headers['Cache-control'] = 'max-age='.$bucket->getOption('maxAge', 0).', public';
326 326
             $headers['Expires'] = gmdate(
327 327
                 'D, d M Y H:i:s T',
328 328
                 time() + $bucket->getOption('maxAge', 0)
Please login to merge, or discard this patch.
source/Spiral/Storage/Servers/SftpServer.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
     protected function getPath(BucketInterface $bucket, $name)
219 219
     {
220 220
         return $this->files->normalizePath(
221
-            $this->options['home'] . '/' . $bucket->getOption('directory') . '/' . $name
221
+            $this->options['home'].'/'.$bucket->getOption('directory').'/'.$name
222 222
         );
223 223
     }
224 224
 
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
      */
233 233
     protected function getUri(BucketInterface $bucket, $name)
234 234
     {
235
-        return 'ssh2.sftp://' . $this->sftp . $this->getPath($bucket, $name);
235
+        return 'ssh2.sftp://'.$this->sftp.$this->getPath($bucket, $name);
236 236
     }
237 237
 
238 238
     /**
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
         $directory = dirname($this->getPath($bucket, $name));
249 249
 
250 250
         $mode = $bucket->getOption('mode', FilesInterface::RUNTIME);
251
-        if (file_exists('ssh2.sftp://' . $this->sftp . $directory)) {
251
+        if (file_exists('ssh2.sftp://'.$this->sftp.$directory)) {
252 252
             if (function_exists('ssh2_sftp_chmod')) {
253 253
                 ssh2_sftp_chmod($this->sftp, $directory, $mode | 0111);
254 254
             }
@@ -264,9 +264,9 @@  discard block
 block discarded – undo
264 264
                 continue;
265 265
             }
266 266
 
267
-            $location .= '/' . $directory;
267
+            $location .= '/'.$directory;
268 268
 
269
-            if (!file_exists('ssh2.sftp://' . $this->sftp . $location)) {
269
+            if (!file_exists('ssh2.sftp://'.$this->sftp.$location)) {
270 270
                 if (!ssh2_sftp_mkdir($this->sftp, $location)) {
271 271
                     throw new ServerException(
272 272
                         "Unable to create directory {$location} using sftp connection."
Please login to merge, or discard this patch.
source/Spiral/Storage/Servers/FtpServer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -255,7 +255,7 @@
 block discarded – undo
255 255
     protected function getPath(BucketInterface $bucket, $name)
256 256
     {
257 257
         return $this->files->normalizePath(
258
-            $this->options['home'] . '/' . $bucket->getOption('directory') . $name
258
+            $this->options['home'].'/'.$bucket->getOption('directory').$name
259 259
         );
260 260
     }
261 261
 
Please login to merge, or discard this patch.
source/Spiral/Storage/Entities/StorageBucket.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@
 block discarded – undo
140 140
      */
141 141
     public function buildAddress($name)
142 142
     {
143
-        return $this->prefix . $name;
143
+        return $this->prefix.$name;
144 144
     }
145 145
 
146 146
     /**
Please login to merge, or discard this patch.