Passed
Pull Request — master (#221)
by Christopher
06:11
created
src/Models/ObjectMap/Entities/Associations/AssociationStubFactory.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -234,7 +234,7 @@
 block discarded – undo
234 234
                     $segments = explode('.', $this->{$item});
235 235
                     $carry[] = end($segments);
236 236
 
237
-             }
237
+                }
238 238
             return $carry;
239 239
         };
240 240
         return call_user_func($getter->bindTo($relation, Relation::class));
Please login to merge, or discard this patch.
Braces   +8 added lines, -7 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      * @return AssociationStubBase
103 103
      */
104 104
     protected static function handleHasManyThrough(string $name, Relation $relation, $cacheKey = 'HasManyThrough'):AssociationStubBase{
105
-        $farParentGetter = function(){
105
+        $farParentGetter = function() {
106 106
             return $this->farParent;
107 107
         };
108 108
         $farParent = call_user_func($farParentGetter->bindTo($relation, HasManyThrough::class));
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      * @return AssociationStubBase
127 127
      */
128 128
     protected static function handleMorphToMany(string $name, Relation $relation, $cacheKey = 'BelongsToMany'): AssociationStubBase{
129
-        $inverseGetter = function(){
129
+        $inverseGetter = function() {
130 130
             return $this->inverse;
131 131
         };
132 132
         $inverse = call_user_func($inverseGetter->bindTo($relation, MorphToMany::class));
@@ -214,8 +214,9 @@  discard block
 block discarded – undo
214 214
         return $stub;
215 215
     }
216 216
 
217
-    private static function getParent(Relation $relation){
218
-        $getter = function(){
217
+    private static function getParent(Relation $relation)
218
+    {
219
+        $getter = function() {
219 220
             return $this->parent;
220 221
         };
221 222
         return call_user_func($getter->bindTo($relation, Relation::class));
@@ -223,11 +224,11 @@  discard block
 block discarded – undo
223 224
 
224 225
     private static function getKeyChain(Relation $relation, string $cacheKey) : array {
225 226
         $fields = self::$fieldOrderCache[$cacheKey];
226
-        $getter =  function() use ($fields){
227
+        $getter =  function() use ($fields) {
227 228
             $carry = [];
228
-            foreach($fields as $item){
229
+            foreach($fields as $item) {
229 230
                     $v = $this->{$item};
230
-                    if($v == null && $item == 'ownerKey'){
231
+                    if($v == null && $item == 'ownerKey') {
231 232
                         $carry[] = null;
232 233
                         continue;
233 234
                     }
Please login to merge, or discard this patch.