Skip to content

Commit 661dfc8

Browse files
committed
Fix styling
1 parent 206f0f9 commit 661dfc8

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

src/Jenssegers/Mongodb/Relations/BelongsToMany.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -301,14 +301,14 @@ protected function buildDictionary(Collection $results)
301301
// parents without having a possibly slow inner loops for every models.
302302
$dictionary = [];
303303

304-
foreach ($results as $result) {
305-
foreach ($result->$foreign as $item) {
306-
if (is_array($item)) {
307-
$dictionary[$item['_id']][] = $result;
308-
} else {
309-
$dictionary[$item][] = $result;
310-
}
311-
}
304+
foreach ($results as $result) {
305+
foreach ($result->$foreign as $item) {
306+
if (is_array($item)) {
307+
$dictionary[$item['_id']][] = $result;
308+
} else {
309+
$dictionary[$item][] = $result;
310+
}
311+
}
312312
}
313313

314314
return $dictionary;

src/Jenssegers/Mongodb/Relations/MorphMany.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,5 @@ protected function buildDictionary(Collection $results)
3131
return $results->mapToDictionary(function ($result) use ($foreign) {
3232
return [(string) $result->{$foreign} => $result];
3333
})->all();
34-
3534
}
3635
}

0 commit comments

Comments
 (0)