Passed
Push — master ( 3263b5...c3fb84 )
by Jonas
15:03 queued 18s
created
src/Relations/Traits/CompositeKeys/SupportsHasManyJsonCompositeKeys.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     protected function addEagerConstraintsWithCompositeKey(array $models): void
47 47
     {
48 48
         $keys = (new BaseCollection($models))->map(
49
-            function (Model $model) {
49
+            function(Model $model) {
50 50
                 return array_map(
51 51
                     fn (string $column) => $model[$column],
52 52
                     $this->localKey
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
         )->values()->unique(null, true)->all();
56 56
 
57 57
         $this->query->where(
58
-            function (Builder $query) use ($keys) {
58
+            function(Builder $query) use ($keys) {
59 59
                 foreach ($keys as $key) {
60 60
                     $query->orWhere(
61
-                        function (Builder $query) use ($key) {
61
+                        function(Builder $query) use ($key) {
62 62
                             foreach ($this->foreignKey as $i => $column) {
63 63
                                 if ($i === 0) {
64 64
                                     $this->whereJsonContainsOrMemberOf(
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
                 $additionalColumns
134 134
             );
135 135
 
136
-            foreach($result->$foreignKey as $value) {
136
+            foreach ($result->$foreignKey as $value) {
137 137
                 $values = [$value, ...$additionalValues];
138 138
 
139 139
                 $key = implode("\0", $values);
Please login to merge, or discard this patch.
src/Relations/Traits/CompositeKeys/SupportsBelongsToJsonCompositeKeys.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     protected function addEagerConstraintsWithCompositeKey(array $models): void
47 47
     {
48 48
         $keys = (new BaseCollection($models))->map(
49
-            function (Model $model) {
49
+            function(Model $model) {
50 50
                 return array_map(
51 51
                     fn (string $column) => $model[$column],
52 52
                     $this->foreignKey
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
         )->values()->unique(null, true)->all();
56 56
 
57 57
         $this->query->where(
58
-            function (Builder $query) use ($keys) {
58
+            function(Builder $query) use ($keys) {
59 59
                 foreach ($keys as $key) {
60 60
                     $query->orWhere(
61
-                        function (Builder $query) use ($key) {
61
+                        function(Builder $query) use ($key) {
62 62
                             foreach ($this->ownerKey as $i => $column) {
63 63
                                 if ($i === 0) {
64 64
                                     $query->whereIn(
Please login to merge, or discard this patch.
src/Relations/HasManyJson.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
         $parentKeys = $this->getKeys($models, $this->localKey);
130 130
 
131
-        $this->query->where(function (Builder $query) use ($parentKeys) {
131
+        $this->query->where(function(Builder $query) use ($parentKeys) {
132 132
             foreach ($parentKeys as $parentKey) {
133 133
                 $this->whereJsonContainsOrMemberOf(
134 134
                     $query,
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
      */
267 267
     public function getRelationExistenceQueryForSelfRelation(Builder $query, Builder $parentQuery, $columns = ['*'])
268 268
     {
269
-        $query->from($query->getModel()->getTable() . ' as ' . $hash = $this->getRelationCountHash());
269
+        $query->from($query->getModel()->getTable().' as '.$hash = $this->getRelationCountHash());
270 270
 
271 271
         $query->getModel()->setTable($hash);
272 272
 
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
 
277 277
         $this->whereJsonContainsOrMemberOf(
278 278
             $query,
279
-            $hash . '.' . $this->getPathName(),
279
+            $hash.'.'.$this->getPathName(),
280 280
             $query->getQuery()->connection->raw($sql)
281 281
         );
282 282
 
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
         $localKey = $this->hasCompositeKey() ? $this->localKey[0] : $this->localKey;
333 333
 
334 334
         $record = (new BaseCollection($records))
335
-            ->filter(function ($value) use ($key, $localKey, $parent) {
335
+            ->filter(function($value) use ($key, $localKey, $parent) {
336 336
                 return Arr::get($value, $key) == $parent->$localKey;
337 337
             })->first();
338 338
 
Please login to merge, or discard this patch.
src/Relations/BelongsToJson.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -315,7 +315,7 @@
 block discarded – undo
315 315
         $ownerKey = $this->hasCompositeKey() ? $this->ownerKey[0] : $this->ownerKey;
316 316
 
317 317
         $record = (new BaseCollection($records))
318
-            ->filter(function ($value) use ($key, $model, $ownerKey) {
318
+            ->filter(function($value) use ($key, $model, $ownerKey) {
319 319
                 return Arr::get($value, $key) == $model->$ownerKey;
320 320
             })->first();
321 321
 
Please login to merge, or discard this patch.