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