Completed
Branch feature/pre-split (32425b)
by Anton
03:32
created
source/Spiral/ORM/Entities/Loaders/ManyToManyLoader.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -47,12 +47,12 @@  discard block
 block discarded – undo
47 47
         if ($this->isJoined()) {
48 48
             $query->join(
49 49
                 $this->getMethod() == self::LEFT_JOIN ? 'LEFT' : 'INNER',
50
-                $this->pivotTable() . ' AS ' . $this->pivotAlias(),
50
+                $this->pivotTable().' AS '.$this->pivotAlias(),
51 51
                 [$this->pivotKey(Record::THOUGHT_INNER_KEY) => $this->parentKey(Record::INNER_KEY)]
52 52
             );
53 53
         } else {
54 54
             $query->innerJoin(
55
-                $this->pivotTable() . ' AS ' . $this->pivotAlias(),
55
+                $this->pivotTable().' AS '.$this->pivotAlias(),
56 56
                 [$this->pivotKey(Record::THOUGHT_OUTER_KEY) => $this->localKey(Record::OUTER_KEY)]
57 57
             )->where(
58 58
                 $this->pivotKey(Record::THOUGHT_INNER_KEY),
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         if ($this->isJoined()) {
73 73
             $query->join(
74 74
                 $this->getMethod() == self::LEFT_JOIN ? 'LEFT' : 'INNER',
75
-                $this->getTable() . ' AS ' . $this->getAlias(),
75
+                $this->getTable().' AS '.$this->getAlias(),
76 76
                 [$this->localKey(Record::OUTER_KEY) => $this->pivotKey(Record::THOUGHT_OUTER_KEY)]
77 77
             );
78 78
         }
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
             if ($minify) {
112 112
                 //Let's use column number instead of full name
113
-                $column = 'p_c' . count($columns);
113
+                $column = 'p_c'.count($columns);
114 114
             }
115 115
 
116 116
             $columns[] = "{$alias}.{$name} AS {$prefix}{$column}";
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
             return $this->options['pivotAlias'];
160 160
         }
161 161
 
162
-        return $this->getAlias() . '_pivot';
162
+        return $this->getAlias().'_pivot';
163 163
     }
164 164
 
165 165
     /**
@@ -185,6 +185,6 @@  discard block
 block discarded – undo
185 185
             return null;
186 186
         }
187 187
 
188
-        return $this->pivotAlias() . '.' . $this->schema[$key];
188
+        return $this->pivotAlias().'.'.$this->schema[$key];
189 189
     }
190 190
 }
191 191
\ No newline at end of file
Please login to merge, or discard this patch.
source/Spiral/ORM/Entities/Loaders/RootLoader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
             return null;
84 84
         }
85 85
 
86
-        return $this->getAlias() . '.' . $primaryKeys[0];
86
+        return $this->getAlias().'.'.$primaryKeys[0];
87 87
     }
88 88
 
89 89
     /**
Please login to merge, or discard this patch.
source/Spiral/ORM/EntityCache.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             throw new CacheException('Entity cache size exceeded');
67 67
         }
68 68
 
69
-        return $this->entities[$class . '.' . $identity] = $entity;
69
+        return $this->entities[$class.'.'.$identity] = $entity;
70 70
     }
71 71
 
72 72
     /**
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      */
78 78
     public function forget(string $class, string $identity)
79 79
     {
80
-        unset($this->entities[$class . '.' . $identity]);
80
+        unset($this->entities[$class.'.'.$identity]);
81 81
     }
82 82
 
83 83
     /**
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      */
91 91
     public function has(string $class, string $identity): bool
92 92
     {
93
-        return isset($this->entities[$class . '.' . $identity]);
93
+        return isset($this->entities[$class.'.'.$identity]);
94 94
     }
95 95
 
96 96
     /**
@@ -103,11 +103,11 @@  discard block
 block discarded – undo
103 103
      */
104 104
     public function get(string $class, string $identity)
105 105
     {
106
-        if (empty($this->entities[$class . '.' . $identity])) {
106
+        if (empty($this->entities[$class.'.'.$identity])) {
107 107
             return null;
108 108
         }
109 109
 
110
-        return $this->entities[$class . '.' . $identity];
110
+        return $this->entities[$class.'.'.$identity];
111 111
     }
112 112
 
113 113
     /**
Please login to merge, or discard this patch.
source/Spiral/Core/Container.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -424,7 +424,7 @@
 block discarded – undo
424 424
 
425 425
         if (!$injector instanceof InjectorInterface) {
426 426
             throw new InjectionException(
427
-                "Class '" . get_class($injector) . "' must be an instance of InjectorInterface for '{$reflection->getName()}'"
427
+                "Class '".get_class($injector)."' must be an instance of InjectorInterface for '{$reflection->getName()}'"
428 428
             );
429 429
         }
430 430
 
Please login to merge, or discard this patch.
source/Spiral/Models/Prototypes/AbstractEntity.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -426,7 +426,7 @@
 block discarded – undo
426 426
     ): AccessorInterface {
427 427
         if (!is_string($accessor) || !class_exists($accessor)) {
428 428
             throw new EntityException(
429
-                "Unable to create accessor for field {$name} in " . static::class
429
+                "Unable to create accessor for field {$name} in ".static::class
430 430
             );
431 431
         }
432 432
 
Please login to merge, or discard this patch.
source/Spiral/ORM/Entities/RecordSource.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      *
96 96
      * @param string|int $id Primary key value.
97 97
      *
98
-     * @return EntityInterface|Record|null
98
+     * @return null|EntityInterface
99 99
      */
100 100
     public function findByPK($id)
101 101
     {
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      * @param array $query  Fields and conditions to query by.
109 109
      * @param array $sortBy Always specify sort by to ensure that results are stable.
110 110
      *
111
-     * @return EntityInterface|Record|null
111
+     * @return null|EntityInterface
112 112
      */
113 113
     public function findOne(array $query = [], array $sortBy = [])
114 114
     {
Please login to merge, or discard this patch.