diff --git a/config/config.php b/config/config.php index 571a7dd95..626510768 100644 --- a/config/config.php +++ b/config/config.php @@ -78,7 +78,6 @@ AuthorizeRestify::class, ], - /* |-------------------------------------------------------------------------- | Used to format data. diff --git a/src/LaravelRestifyServiceProvider.php b/src/LaravelRestifyServiceProvider.php index 102ecbbf0..ea6907705 100644 --- a/src/LaravelRestifyServiceProvider.php +++ b/src/LaravelRestifyServiceProvider.php @@ -70,13 +70,13 @@ public function register() protected function registerPublishing() { $this->publishes([ - __DIR__ . '/Commands/stubs/RestifyServiceProvider.stub' => app_path('Providers/RestifyServiceProvider.php'), + __DIR__.'/Commands/stubs/RestifyServiceProvider.stub' => app_path('Providers/RestifyServiceProvider.php'), ], 'restify-provider'); $this->publishes([ - __DIR__ . '/../config/config.php' => config_path('restify.php'), + __DIR__.'/../config/config.php' => config_path('restify.php'), ], 'restify-config'); - $this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'restify'); + $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'restify'); } } diff --git a/src/Repositories/Casts/RelatedCast.php b/src/Repositories/Casts/RelatedCast.php index 65634e834..373568e9a 100644 --- a/src/Repositories/Casts/RelatedCast.php +++ b/src/Repositories/Casts/RelatedCast.php @@ -8,7 +8,6 @@ use Illuminate\Http\Request; use Illuminate\Support\Collection; - class RelatedCast extends RepositoryCast { public static function fromBuilder(Request $request, Builder $builder): Collection diff --git a/tests/Controllers/RepositoryIndexControllerTest.php b/tests/Controllers/RepositoryIndexControllerTest.php index b8da3a357..4503630c9 100644 --- a/tests/Controllers/RepositoryIndexControllerTest.php +++ b/tests/Controllers/RepositoryIndexControllerTest.php @@ -100,7 +100,7 @@ public function test_using_custom_related_casts() PostRepository::$related = ['user']; config([ - 'restify.casts.related' => RelatedCastWithAttributes::class + 'restify.casts.related' => RelatedCastWithAttributes::class, ]); $user = $this->mockUsers(1)->first(); @@ -114,11 +114,11 @@ public function test_using_custom_related_casts() [ 'relationships' => [ 'user' => [ - ['attributes'] + ['attributes'], ], - ] - ] - ] + ], + ], + ], ]); } @@ -136,7 +136,7 @@ public function test_repository_with_deep_relations() }); }); - $response = $this->getJson(CompanyRepository::uriKey() . '?related=users.posts') + $response = $this->getJson(CompanyRepository::uriKey().'?related=users.posts') ->assertOk(); $this->assertCount(1, $response->json('data.0.relationships.users')); diff --git a/tests/Feature/Authentication/AuthServiceRegisterTest.php b/tests/Feature/Authentication/AuthServiceRegisterTest.php index 07c6bd5b2..3496cc284 100644 --- a/tests/Feature/Authentication/AuthServiceRegisterTest.php +++ b/tests/Feature/Authentication/AuthServiceRegisterTest.php @@ -2,12 +2,9 @@ namespace Binaryk\LaravelRestify\Tests\Feature\Authentication; -use Binaryk\LaravelRestify\Contracts\Passportable; -use Binaryk\LaravelRestify\Exceptions\AuthenticatableUserException; use Binaryk\LaravelRestify\Exceptions\Eloquent\EntityNotFoundException; use Binaryk\LaravelRestify\Models\LaravelRestifyModel; use Binaryk\LaravelRestify\Services\AuthService; -use Binaryk\LaravelRestify\Tests\Fixtures\User\SampleUser; use Binaryk\LaravelRestify\Tests\Fixtures\User\User; use Binaryk\LaravelRestify\Tests\IntegrationTest; use Illuminate\Auth\Access\AuthorizationException; diff --git a/tests/Fixtures/Post/RelatedCastWithAttributes.php b/tests/Fixtures/Post/RelatedCastWithAttributes.php index 1c9c9fc81..3c24fe20f 100644 --- a/tests/Fixtures/Post/RelatedCastWithAttributes.php +++ b/tests/Fixtures/Post/RelatedCastWithAttributes.php @@ -15,13 +15,13 @@ public static function fromBuilder(Request $request, Builder $builder): Collecti { return $builder->take($request->input('relatablePerPage') ?? (static::$defaultRelatablePerPage ?? RestifySearchable::DEFAULT_RELATABLE_PER_PAGE)) ->get() - ->map(fn($item) => ['attributes' => $item->toArray()]); + ->map(fn ($item) => ['attributes' => $item->toArray()]); } public static function fromRelation(Request $request, Relation $relation): Collection { return $relation->take($request->input('relatablePerPage') ?? (static::$defaultRelatablePerPage ?? RestifySearchable::DEFAULT_RELATABLE_PER_PAGE)) ->get() - ->map(fn($item) => ['attributes' => $item->toArray()]); + ->map(fn ($item) => ['attributes' => $item->toArray()]); } } diff --git a/tests/IntegrationTest.php b/tests/IntegrationTest.php index ec3edb080..dce19f7c1 100644 --- a/tests/IntegrationTest.php +++ b/tests/IntegrationTest.php @@ -56,7 +56,7 @@ protected function setUp(): void $this->injectTranslator(); $this->app->bind(ExceptionHandler::class, RestifyHandler::class); - Restify::$authUsing = function() { + Restify::$authUsing = function () { return true; }; }