@@ -186,8 +186,8 @@ |
||
186 | 186 | */ |
187 | 187 | protected function updateLightStack(int $newCount) |
188 | 188 | { |
189 | - $this->lightStack[$newCount - 1]['count']--; |
|
190 | - if (0 == $this->lightStack[$newCount - 1]['count']) { |
|
189 | + $this->lightStack[$newCount-1]['count']--; |
|
190 | + if (0 == $this->lightStack[$newCount-1]['count']) { |
|
191 | 191 | array_pop($this->lightStack); |
192 | 192 | } |
193 | 193 | } |
@@ -63,7 +63,7 @@ |
||
63 | 63 | { |
64 | 64 | $class = __CLASS__; |
65 | 65 | if (!isset($classMap[$class])) { |
66 | - throw new \Exception(sprintf('%s was not found in autoload class map, this usually indicates you '. |
|
66 | + throw new \Exception(sprintf('%s was not found in autoload class map, this usually indicates you ' . |
|
67 | 67 | 'need to dump an optimised autoloader (`composer dump-autoload -o`)', $class)); |
68 | 68 | } |
69 | 69 | } |
@@ -187,8 +187,7 @@ |
||
187 | 187 | $keyName = $this->polyglotFkKey($relation); |
188 | 188 | $localName = $this->polyglotRkKey($relation); |
189 | 189 | $thruName = $relation instanceof HasManyThrough ? |
190 | - $this->polyglotThroughKey($relation) : |
|
191 | - null; |
|
190 | + $this->polyglotThroughKey($relation) : null; |
|
192 | 191 | |
193 | 192 | $first = $keyName; |
194 | 193 | $last = $localName; |
@@ -31,23 +31,19 @@ |
||
31 | 31 | switch (true) { |
32 | 32 | case $rel instanceof BelongsTo: |
33 | 33 | $key = $fk ? |
34 | - $rel->{$this->checkMethodNameList($rel, ['getForeignKeyName', 'getForeignKey'])}() : |
|
35 | - $rel->{$this->checkMethodNameList($rel, ['getOwnerKey', 'getOwnerKeyName'])}(); |
|
34 | + $rel->{$this->checkMethodNameList($rel, ['getForeignKeyName', 'getForeignKey'])}() : $rel->{$this->checkMethodNameList($rel, ['getOwnerKey', 'getOwnerKeyName'])}(); |
|
36 | 35 | break; |
37 | 36 | case $rel instanceof BelongsToMany: |
38 | 37 | $key = $fk ? |
39 | - $rel->getForeignPivotKeyName() : |
|
40 | - $rel->getRelatedPivotKeyName(); |
|
38 | + $rel->getForeignPivotKeyName() : $rel->getRelatedPivotKeyName(); |
|
41 | 39 | break; |
42 | 40 | case $rel instanceof HasOneOrMany: |
43 | 41 | $key = $fk ? |
44 | - $rel->getForeignKeyName() : |
|
45 | - $rel->{$this->checkMethodNameList($rel, ['getLocalKeyName', 'getQualifiedParentKeyName'])}(); |
|
42 | + $rel->getForeignKeyName() : $rel->{$this->checkMethodNameList($rel, ['getLocalKeyName', 'getQualifiedParentKeyName'])}(); |
|
46 | 43 | break; |
47 | 44 | case $rel instanceof HasManyThrough: |
48 | 45 | $key = $fk ? |
49 | - $rel->getQualifiedFarKeyName() : |
|
50 | - $rel->getQualifiedParentKeyName(); |
|
46 | + $rel->getQualifiedFarKeyName() : $rel->getQualifiedParentKeyName(); |
|
51 | 47 | break; |
52 | 48 | default: |
53 | 49 | $msg = sprintf('Unknown Relationship Type %s', get_class($rel)); |