Skip to content

Commit

Permalink
Apply fixes from StyleCI (#324)
Browse files Browse the repository at this point in the history
  • Loading branch information
binaryk authored Dec 22, 2020
1 parent f52f92c commit d474838
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/Fields/BelongsToMany.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Binaryk\LaravelRestify\Fields\Concerns\Attachable;
use Binaryk\LaravelRestify\Repositories\Repository;
use Closure;
use Exception;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Gate;
Expand Down Expand Up @@ -55,7 +54,7 @@ public function resolve($repository, $attribute = null)
->allowToShow(app(Request::class))
->withExtraFields(
collect($this->pivotFields)->each(function (Field $field) use ($item) {
return $field->resolveCallback(fn() => $item->pivot->{$field->attribute});
return $field->resolveCallback(fn () => $item->pivot->{$field->attribute});
})->all()
)
->eagerState();
Expand Down
6 changes: 3 additions & 3 deletions tests/Fields/HasManyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function test_has_many_present_on_relations()
$user = factory(User::class)->create();

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

$this->get(UserWithPosts::uriKey()."/$user->id?related=posts")
Expand All @@ -51,8 +51,8 @@ public function test_has_many_present_on_relations()
'posts' => [
[
'id',
'attributes'
]
'attributes',
],
],
],
],
Expand Down

0 comments on commit d474838

Please sign in to comment.