@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | // when combined with an "_id" should conventionally match the columns. |
48 | 48 | if (is_null($foreignKey)) { |
49 | 49 | $foreignKey = is_array($instance->getKeyName()) ? array_map( |
50 | - function ($key) use ($relation) { |
|
50 | + function($key) use ($relation) { |
|
51 | 51 | return Str::snake($relation).'_'.$key; |
52 | 52 | }, |
53 | 53 | $instance->getKeyName() |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | */ |
101 | 101 | protected function newBelongsTo(Builder $query, Model $child, $foreignKey, $ownerKey, $relation) |
102 | 102 | { |
103 | - return $this->executeWithinOptionalBinaryTransformation(function () use ($query, $child, $foreignKey, $ownerKey, $relation) { |
|
103 | + return $this->executeWithinOptionalBinaryTransformation(function() use ($query, $child, $foreignKey, $ownerKey, $relation) { |
|
104 | 104 | return new CompositeBelongsTo($query, $child, $foreignKey, $ownerKey, $relation); |
105 | 105 | }, $query->getModel(), $child); |
106 | 106 | } |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | */ |
118 | 118 | protected function newHasOne(Builder $query, Model $parent, $foreignKey, $localKey) |
119 | 119 | { |
120 | - return $this->executeWithinOptionalBinaryTransformation(function () use ($query, $parent, $foreignKey, $localKey) { |
|
120 | + return $this->executeWithinOptionalBinaryTransformation(function() use ($query, $parent, $foreignKey, $localKey) { |
|
121 | 121 | return new HasOne($query, $parent, $foreignKey, $localKey); |
122 | 122 | }, $query->getModel(), $parent); |
123 | 123 | } |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | */ |
136 | 136 | protected function newMorphOne(Builder $query, Model $parent, $type, $id, $localKey) |
137 | 137 | { |
138 | - return $this->executeWithinOptionalBinaryTransformation(function () use ($query, $parent, $type, $id, $localKey) { |
|
138 | + return $this->executeWithinOptionalBinaryTransformation(function() use ($query, $parent, $type, $id, $localKey) { |
|
139 | 139 | return new MorphOne($query, $parent, $type, $id, $localKey); |
140 | 140 | }, $query->getModel(), $parent); |
141 | 141 | } |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | */ |
155 | 155 | protected function newMorphTo(Builder $query, Model $parent, $foreignKey, $ownerKey, $type, $relation) |
156 | 156 | { |
157 | - return $this->executeWithinOptionalBinaryTransformation(function () use ($query, $parent, $foreignKey, $ownerKey, $type, $relation) { |
|
157 | + return $this->executeWithinOptionalBinaryTransformation(function() use ($query, $parent, $foreignKey, $ownerKey, $type, $relation) { |
|
158 | 158 | return new MorphTo($query, $parent, $foreignKey, $ownerKey, $type, $relation); |
159 | 159 | }, $query->getModel(), $parent); |
160 | 160 | } |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | */ |
172 | 172 | protected function newHasMany(Builder $query, Model $parent, $foreignKey, $localKey) |
173 | 173 | { |
174 | - return $this->executeWithinOptionalBinaryTransformation(function () use ($query, $parent, $foreignKey, $localKey) { |
|
174 | + return $this->executeWithinOptionalBinaryTransformation(function() use ($query, $parent, $foreignKey, $localKey) { |
|
175 | 175 | return new HasMany($query, $parent, $foreignKey, $localKey); |
176 | 176 | }, $query->getModel(), $parent); |
177 | 177 | } |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | */ |
192 | 192 | protected function newHasManyThrough(Builder $query, Model $farParent, Model $throughParent, $firstKey, $secondKey, $localKey, $secondLocalKey) |
193 | 193 | { |
194 | - return $this->executeWithinOptionalBinaryTransformation(function () use ($query, $farParent, $throughParent, $firstKey, $secondKey, $localKey, $secondLocalKey) { |
|
194 | + return $this->executeWithinOptionalBinaryTransformation(function() use ($query, $farParent, $throughParent, $firstKey, $secondKey, $localKey, $secondLocalKey) { |
|
195 | 195 | return new HasManyThrough($query, $farParent, $throughParent, $firstKey, $secondKey, $localKey, $secondLocalKey); |
196 | 196 | }, $query->getModel(), $farParent); |
197 | 197 | } |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | */ |
210 | 210 | protected function newMorphMany(Builder $query, Model $parent, $type, $id, $localKey) |
211 | 211 | { |
212 | - return $this->executeWithinOptionalBinaryTransformation(function () use ($query, $parent, $type, $id, $localKey) { |
|
212 | + return $this->executeWithinOptionalBinaryTransformation(function() use ($query, $parent, $type, $id, $localKey) { |
|
213 | 213 | return new MorphMany($query, $parent, $type, $id, $localKey); |
214 | 214 | }, $query->getModel(), $parent); |
215 | 215 | } |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | protected function newBelongsToMany(Builder $query, Model $parent, $table, $foreignPivotKey, $relatedPivotKey, |
232 | 232 | $parentKey, $relatedKey, $relationName = null) |
233 | 233 | { |
234 | - return $this->executeWithinOptionalBinaryTransformation(function () use ($query, $parent, $table, $foreignPivotKey, $relatedPivotKey, $parentKey, $relatedKey, $relationName) { |
|
234 | + return $this->executeWithinOptionalBinaryTransformation(function() use ($query, $parent, $table, $foreignPivotKey, $relatedPivotKey, $parentKey, $relatedKey, $relationName) { |
|
235 | 235 | return new CompositeBelongsToMany($query, $parent, $table, $foreignPivotKey, $relatedPivotKey, $parentKey, $relatedKey, $relationName); |
236 | 236 | }, $query->getModel(), $parent); |
237 | 237 | } |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | $relatedPivotKey, $parentKey, $relatedKey, |
257 | 257 | $relationName = null, $inverse = false) |
258 | 258 | { |
259 | - return $this->executeWithinOptionalBinaryTransformation(function () use ($query, $parent, $name, $table, $foreignPivotKey, $relatedPivotKey, $parentKey, $relatedKey, |
|
259 | + return $this->executeWithinOptionalBinaryTransformation(function() use ($query, $parent, $name, $table, $foreignPivotKey, $relatedPivotKey, $parentKey, $relatedKey, |
|
260 | 260 | $relationName, $inverse) { |
261 | 261 | return new MorphToMany($query, $parent, $name, $table, $foreignPivotKey, $relatedPivotKey, $parentKey, $relatedKey, |
262 | 262 | $relationName, $inverse); |