Skip to content

Commit 014e860

Browse files
committed
Applied changes from StyleCI
1 parent 2efacef commit 014e860

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/Jenssegers/Mongodb/Relations/BelongsToMany.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ public function attach($id, array $attributes = [], $touch = true)
222222
$query = $this->newRelatedQuery();
223223

224224
$query
225-
->whereIn($this->related->getKeyName(), (array)$id)
225+
->whereIn($this->related->getKeyName(), (array) $id)
226226
->orWhereIn($this->related->getKeyName().'._id', (array) $id);
227227

228228
// Attach the new parent id to the related model.
@@ -231,7 +231,7 @@ public function attach($id, array $attributes = [], $touch = true)
231231

232232
//Pivot Collection
233233
$pivot_x = [];
234-
foreach ((array)$id as $item) {
234+
foreach ((array) $id as $item) {
235235
$pivot_x[] = array_merge($attributes, ['_id' => $item]);
236236
}
237237

@@ -296,9 +296,9 @@ protected function buildDictionary(Collection $results)
296296

297297
foreach ($results as $result) {
298298
foreach ($result->$foreign as $item) {
299-
if (is_array($item)){
299+
if (is_array($item)) {
300300
$dictionary[$item['_id']][]=$result;
301-
}else {
301+
} else {
302302
$dictionary[$item][] = $result;
303303
}
304304
}
@@ -392,4 +392,4 @@ protected function whereInMethod(EloquentModel $model, $key)
392392
{
393393
return 'whereIn';
394394
}
395-
}
395+
}

src/Jenssegers/Mongodb/Relations/MorphMany.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22

3-
43
namespace Jenssegers\Mongodb\Relations;
54

65
use Illuminate\Database\Eloquent\Collection;
@@ -16,4 +15,4 @@ protected function buildDictionary(Collection $results)
1615
return [(string) $result->{$foreign} => $result];
1716
})->all();
1817
}
19-
}
18+
}

0 commit comments

Comments
 (0)