@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | public function addConstraints() |
27 | 27 | { |
28 | 28 | if (static::$constraints) { |
29 | - $constraint = function (Builder $query) { |
|
29 | + $constraint = function(Builder $query) { |
|
30 | 30 | if ($this->andSelf) { |
31 | 31 | $query->where($this->getQualifiedLocalKeyName(), '=', $this->getParentKey()); |
32 | 32 | } else { |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | |
54 | 54 | $keys = $this->getKeys($models, $this->localKey); |
55 | 55 | |
56 | - $constraint = function (Builder $query) use ($whereIn, $column, $keys) { |
|
56 | + $constraint = function(Builder $query) use ($whereIn, $column, $keys) { |
|
57 | 57 | $query->$whereIn($column, $keys); |
58 | 58 | }; |
59 | 59 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | |
102 | 102 | $foreignKey = $this->getForeignKeyName(); |
103 | 103 | |
104 | - return $results->mapToDictionary(function (Model $result) use ($dictionary, $foreignKey) { |
|
104 | + return $results->mapToDictionary(function(Model $result) use ($dictionary, $foreignKey) { |
|
105 | 105 | if ($result->hasNestedPath()) { |
106 | 106 | $key = $dictionary[$result->getFirstPathSegment()]->{$foreignKey}; |
107 | 107 | } else { |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | ? $query->getQuery()->from.'.'.$this->localKey |
131 | 131 | : $this->foreignKey; |
132 | 132 | |
133 | - $constraint = function (Builder $query) use ($first) { |
|
133 | + $constraint = function(Builder $query) use ($first) { |
|
134 | 134 | $query->whereColumn( |
135 | 135 | $first, |
136 | 136 | '=', |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | ? $table.'.'.$this->localKey |
166 | 166 | : $table.'.'.$this->getForeignKeyName(); |
167 | 167 | |
168 | - $constraint = function (Builder $query) use ($first) { |
|
168 | + $constraint = function(Builder $query) use ($first) { |
|
169 | 169 | $query->whereColumn( |
170 | 170 | $first, |
171 | 171 | '=', |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | $keys = $this->getKeys($models, $this->parentKey); |
59 | 59 | |
60 | - $constraint = function (Builder $query) use ($whereIn, $column, $keys) { |
|
60 | + $constraint = function(Builder $query) use ($whereIn, $column, $keys) { |
|
61 | 61 | $query->$whereIn($column, $keys); |
62 | 62 | }; |
63 | 63 | |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | */ |
81 | 81 | protected function buildDictionary(Collection $results) |
82 | 82 | { |
83 | - return $results->mapToDictionary(function (Model $result) { |
|
83 | + return $results->mapToDictionary(function(Model $result) { |
|
84 | 84 | return [$result->getFirstPathSegment() => $result]; |
85 | 85 | })->all(); |
86 | 86 | } |