Passed
Push — master ( 2097d5...663657 )
by Maksim
04:27 queued 01:00
created
src/Http/Traits/CompositeRelationships.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
         $relatedKey,
239 239
         $relationName = null
240 240
     ) {
241
-        return $this->executeWithinOptionalBinaryTransformation(function () use ($query, $parent, $table, $foreignPivotKey, $relatedPivotKey, $parentKey, $relatedKey, $relationName) {
241
+        return $this->executeWithinOptionalBinaryTransformation(function() use ($query, $parent, $table, $foreignPivotKey, $relatedPivotKey, $parentKey, $relatedKey, $relationName) {
242 242
             return new CompositeBelongsToMany($query, $parent, $table, $foreignPivotKey, $relatedPivotKey, $parentKey, $relatedKey, $relationName);
243 243
         }, $query->getModel(), $parent);
244 244
     }
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
         $relationName = null,
272 272
         $inverse = false
273 273
     ) {
274
-        return $this->executeWithinOptionalBinaryTransformation(function () use ($query, $parent, $name, $table, $foreignPivotKey, $relatedPivotKey, $parentKey, $relatedKey,
274
+        return $this->executeWithinOptionalBinaryTransformation(function() use ($query, $parent, $name, $table, $foreignPivotKey, $relatedPivotKey, $parentKey, $relatedKey,
275 275
             $relationName, $inverse) {
276 276
             return new MorphToMany(
277 277
                 $query,
Please login to merge, or discard this patch.