Skip to content

Commit d474838

Browse files
authored
Apply fixes from StyleCI (#324)
1 parent f52f92c commit d474838

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/Fields/BelongsToMany.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use Binaryk\LaravelRestify\Fields\Concerns\Attachable;
77
use Binaryk\LaravelRestify\Repositories\Repository;
88
use Closure;
9-
use Exception;
109
use Illuminate\Auth\Access\AuthorizationException;
1110
use Illuminate\Http\Request;
1211
use Illuminate\Support\Facades\Gate;
@@ -55,7 +54,7 @@ public function resolve($repository, $attribute = null)
5554
->allowToShow(app(Request::class))
5655
->withExtraFields(
5756
collect($this->pivotFields)->each(function (Field $field) use ($item) {
58-
return $field->resolveCallback(fn() => $item->pivot->{$field->attribute});
57+
return $field->resolveCallback(fn () => $item->pivot->{$field->attribute});
5958
})->all()
6059
)
6160
->eagerState();

tests/Fields/HasManyTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function test_has_many_present_on_relations()
4141
$user = factory(User::class)->create();
4242

4343
factory(Post::class)->times(2)->create([
44-
'user_id' => $user->id
44+
'user_id' => $user->id,
4545
]);
4646

4747
$this->get(UserWithPosts::uriKey()."/$user->id?related=posts")
@@ -51,8 +51,8 @@ public function test_has_many_present_on_relations()
5151
'posts' => [
5252
[
5353
'id',
54-
'attributes'
55-
]
54+
'attributes',
55+
],
5656
],
5757
],
5858
],

0 commit comments

Comments
 (0)