Completed
Pull Request — master (#219)
by Christopher
06:20
created
src/Models/MetadataKeyMethodNamesTrait.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -35,13 +35,13 @@  discard block
 block discarded – undo
35 35
         }elseif ($foo instanceof BelongsToMany) {
36 36
             $fkList = ['getForeignPivotKeyName'];
37 37
             $rkList = ['getRelatedPivotKeyName'];
38
-        }elseif($foo instanceof HasOneOrMany){
38
+        }elseif ($foo instanceof HasOneOrMany) {
39 39
             $fkList = ['getForeignKeyName'];
40 40
             $rkList = ['getLocalKeyName', 'getQualifiedParentKeyName'];
41
-        }elseif($foo instanceof HasManyThrough) {
41
+        }elseif ($foo instanceof HasManyThrough) {
42 42
             $fkList = ['getQualifiedFarKeyName'];
43 43
             $rkList = ['getQualifiedParentKeyName'];
44
-        }else{
44
+        } else {
45 45
             $msg = sprintf('Unknown Relationship Type %s', get_class($foo));
46 46
             throw new InvalidOperationException($msg);
47 47
         }
@@ -87,8 +87,8 @@  discard block
 block discarded – undo
87 87
         }
88 88
     }
89 89
 
90
-    protected function polyglotThroughKey(Relation $rel){
91
-        if(! $rel instanceof HasManyThrough){
90
+    protected function polyglotThroughKey(Relation $rel) {
91
+        if (!$rel instanceof HasManyThrough) {
92 92
             return null;
93 93
         }
94 94
         $segments = explode('.', $rel->{$this->checkMethodNameList($rel, ['getThroughKey', 'getQualifiedFirstKeyName'])}());
@@ -136,6 +136,6 @@  discard block
 block discarded – undo
136 136
             }
137 137
         }
138 138
         $msg = 'Expected at least 1 element in related-key list, got 0 for relation %s';
139
-        throw new InvalidOperationException(sprintf($msg,get_class($foo)));
139
+        throw new InvalidOperationException(sprintf($msg, get_class($foo)));
140 140
     }
141 141
 }
Please login to merge, or discard this patch.