Completed
Branch feature/pre-split (211a78)
by Anton
05:08
created
source/Spiral/Reactor/ClassDeclaration.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
         $result = '';
293 293
 
294 294
         if (!$this->docComment->isEmpty()) {
295
-            $result .= $this->docComment->render($indentLevel) . "\n";
295
+            $result .= $this->docComment->render($indentLevel)."\n";
296 296
         }
297 297
 
298 298
         //Class header
@@ -308,27 +308,27 @@  discard block
 block discarded – undo
308 308
             $header .= " implements {$interfaces}";
309 309
         }
310 310
 
311
-        $result .= $this->indent($header, $indentLevel) . "\n";
312
-        $result .= $this->indent("{", $indentLevel) . "\n";
311
+        $result .= $this->indent($header, $indentLevel)."\n";
312
+        $result .= $this->indent("{", $indentLevel)."\n";
313 313
 
314 314
         //Rendering content
315 315
         if (!empty($this->traits)) {
316
-            $result .= $this->renderTraits($indentLevel + 1) . "\n\n";
316
+            $result .= $this->renderTraits($indentLevel + 1)."\n\n";
317 317
         }
318 318
 
319 319
         if (!$this->constants->isEmpty()) {
320
-            $result .= $this->constants->render($indentLevel + 1) . "\n\n";
320
+            $result .= $this->constants->render($indentLevel + 1)."\n\n";
321 321
         }
322 322
 
323 323
         if (!$this->properties->isEmpty()) {
324
-            $result .= $this->properties->render($indentLevel + 1) . "\n\n";
324
+            $result .= $this->properties->render($indentLevel + 1)."\n\n";
325 325
         }
326 326
 
327 327
         if (!$this->methods->isEmpty()) {
328
-            $result .= $this->methods->render($indentLevel + 1) . "\n\n";
328
+            $result .= $this->methods->render($indentLevel + 1)."\n\n";
329 329
         }
330 330
 
331
-        $result = rtrim($result, "\n") . "\n";
331
+        $result = rtrim($result, "\n")."\n";
332 332
         $result .= $this->indent("}", $indentLevel);
333 333
 
334 334
         return $result;
Please login to merge, or discard this patch.
source/Spiral/Reactor/ClassDeclaration/ParameterDeclaration.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -143,15 +143,15 @@
 block discarded – undo
143 143
     {
144 144
         $type = '';
145 145
         if (!empty($this->type)) {
146
-            $type = $this->type . " ";
146
+            $type = $this->type." ";
147 147
         }
148 148
 
149
-        $result = $type . ($this->pdb ? '&' : '') . "$" . $this->getName();
149
+        $result = $type.($this->pdb ? '&' : '')."$".$this->getName();
150 150
 
151 151
         if (!$this->isOptional) {
152 152
             return $result;
153 153
         }
154 154
 
155
-        return $result . ' = ' . $this->serializer()->serialize($this->defaultValue);
155
+        return $result.' = '.$this->serializer()->serialize($this->defaultValue);
156 156
     }
157 157
 }
158 158
\ No newline at end of file
Please login to merge, or discard this patch.
source/Spiral/Reactor/ClassDeclaration/PropertyDeclaration.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
     {
94 94
         $result = '';
95 95
         if (!$this->docComment->isEmpty()) {
96
-            $result .= $this->docComment->render($indentLevel) . "\n";
96
+            $result .= $this->docComment->render($indentLevel)."\n";
97 97
         }
98 98
 
99 99
         $result .= $this->indent("{$this->access} \${$this->getName()}", $indentLevel);
Please login to merge, or discard this patch.
source/Spiral/Reactor/ClassDeclaration/MethodDeclaration.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
     {
136 136
         $result = '';
137 137
         if (!$this->docComment->isEmpty()) {
138
-            $result .= $this->docComment->render($indentLevel) . "\n";
138
+            $result .= $this->docComment->render($indentLevel)."\n";
139 139
         }
140 140
 
141 141
         $method = "{$this->getAccess()} function {$this->getName()}";
@@ -145,11 +145,11 @@  discard block
 block discarded – undo
145 145
             $method .= "()";
146 146
         }
147 147
 
148
-        $result .= $this->indent($method, $indentLevel) . "\n";
149
-        $result .= $this->indent('{', $indentLevel) . "\n";
148
+        $result .= $this->indent($method, $indentLevel)."\n";
149
+        $result .= $this->indent('{', $indentLevel)."\n";
150 150
 
151 151
         if (!$this->source->isEmpty()) {
152
-            $result .= $this->source->render($indentLevel + 1) . "\n";
152
+            $result .= $this->source->render($indentLevel + 1)."\n";
153 153
         }
154 154
 
155 155
         $result .= $this->indent("}", $indentLevel);
Please login to merge, or discard this patch.
source/Spiral/Reactor/ClassDeclaration/ConstantDeclaration.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,12 +75,12 @@
 block discarded – undo
75 75
     {
76 76
         $result = '';
77 77
         if (!$this->docComment->isEmpty()) {
78
-            $result .= $this->docComment->render($indentLevel) . "\n";
78
+            $result .= $this->docComment->render($indentLevel)."\n";
79 79
         }
80 80
 
81 81
         $result .= $this->indent("const {$this->getName()} = ", $indentLevel);
82 82
 
83 83
         //todo: make indent level work
84
-        return $result . $this->serializer()->serialize($this->value);
84
+        return $result.$this->serializer()->serialize($this->value);
85 85
     }
86 86
 }
87 87
\ No newline at end of file
Please login to merge, or discard this patch.
source/Spiral/Reactor/FileDeclaration.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         $result = "<?php\n";
109 109
 
110 110
         if (!$this->docComment->isEmpty()) {
111
-            $result .= $this->docComment->render($indentLevel) . "\n";
111
+            $result .= $this->docComment->render($indentLevel)."\n";
112 112
         }
113 113
 
114 114
         if (!empty($this->namespace)) {
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         }
117 117
 
118 118
         if (!empty($this->uses)) {
119
-            $result .= $this->renderUses($indentLevel) . "\n\n";
119
+            $result .= $this->renderUses($indentLevel)."\n\n";
120 120
         }
121 121
 
122 122
         $result .= $this->elements->render($indentLevel);
Please login to merge, or discard this patch.
source/Spiral/ODM/Entities/DocumentSelector.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
     public function __debugInfo()
329 329
     {
330 330
         return [
331
-            'collection' => $this->getDatabase() . '/' . $this->getCollection(),
331
+            'collection' => $this->getDatabase().'/'.$this->getCollection(),
332 332
             'query'      => $this->query,
333 333
             'limit'      => $this->getLimit(),
334 334
             'offset'     => $this->getOffset(),
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
      */
423 423
     private function normalizeDates(array $query)
424 424
     {
425
-        array_walk_recursive($query, function (&$value) {
425
+        array_walk_recursive($query, function(&$value) {
426 426
             if ($value instanceof \DateTime) {
427 427
                 //MongoDate is always UTC, which is good :)
428 428
                 $value = new \MongoDate($value->getTimestamp());
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
             $debug['explained'] = $cursor->explain();
472 472
         }
473 473
 
474
-        $this->logger()->debug('{db}/{collection}: ' . json_encode($debug, JSON_PRETTY_PRINT), [
474
+        $this->logger()->debug('{db}/{collection}: '.json_encode($debug, JSON_PRETTY_PRINT), [
475 475
             'db'         => $this->getDatabase(),
476 476
             'collection' => $this->getCollection(),
477 477
             'queryInfo'  => $debug,
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -436,7 +436,7 @@
 block discarded – undo
436 436
      * Debug information and logging.
437 437
      *
438 438
      * @param \MongoCursor $cursor
439
-     * @param int|bool     $profiling Profiling level
439
+     * @param integer     $profiling Profiling level
440 440
      */
441 441
     protected function describeCursor(
442 442
         \MongoCursor $cursor,
Please login to merge, or discard this patch.
source/Spiral/ODM/Document.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 
137 137
         if ($this->isEmbedded()) {
138 138
             throw new DocumentException(
139
-                "Embedded document '" . get_class($this) . "' can not be saved into collection"
139
+                "Embedded document '".get_class($this)."' can not be saved into collection"
140 140
             );
141 141
         }
142 142
 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
     {
181 181
         if ($this->isEmbedded()) {
182 182
             throw new DocumentException(
183
-                "Embedded document '" . get_class($this) . "' can not be deleted from collection"
183
+                "Embedded document '".get_class($this)."' can not be deleted from collection"
184 184
             );
185 185
         }
186 186
 
Please login to merge, or discard this patch.
source/Spiral/ODM/DocumentEntity.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
     public function setField($name, $value, $filter = true)
286 286
     {
287 287
         if (!$this->hasField($name)) {
288
-            throw new FieldException("Undefined field '{$name}' in '" . static::class . "'");
288
+            throw new FieldException("Undefined field '{$name}' in '".static::class."'");
289 289
         }
290 290
 
291 291
         //Original field value
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
             }
416 416
 
417 417
             if (is_array($value)) {
418
-                array_walk_recursive($value, function (&$value) {
418
+                array_walk_recursive($value, function(&$value) {
419 419
                     if ($value instanceof \MongoId) {
420 420
                         $value = (string)$value;
421 421
                     }
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
 
521 521
             foreach ($this->atomics as $atomic => $fields) {
522 522
                 foreach ($fields as $field => $value) {
523
-                    $atomics[$atomic][$container . '.' . $field] = $value;
523
+                    $atomics[$atomic][$container.'.'.$field] = $value;
524 524
                 }
525 525
             }
526 526
         }
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
             if ($value instanceof DocumentAccessorInterface) {
534 534
                 $atomics = array_merge_recursive(
535 535
                     $atomics,
536
-                    $value->buildAtomics(($container ? $container . '.' : '') . $field)
536
+                    $value->buildAtomics(($container ? $container.'.' : '').$field)
537 537
                 );
538 538
 
539 539
                 continue;
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
 
549 549
             if (array_key_exists($field, $this->updates)) {
550 550
                 //Generating set operation for changed field
551
-                $atomics[self::ATOMIC_SET][($container ? $container . '.' : '') . $field] = $value;
551
+                $atomics[self::ATOMIC_SET][($container ? $container.'.' : '').$field] = $value;
552 552
             }
553 553
         }
554 554
 
Please login to merge, or discard this patch.