From d6d39f09b846b96f0da9b4d87874527a93d1845d Mon Sep 17 00:00:00 2001 From: Lupacescu Eduard Date: Tue, 21 Jan 2020 10:17:54 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/Repositories/Crudable.php | 1 - src/Repositories/ResponseResolver.php | 2 +- src/RestifyCustomRoutesProvider.php | 2 +- tests/RepositoryWithRoutesTest.php | 4 ++-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Repositories/Crudable.php b/src/Repositories/Crudable.php index d9e2a70e6..208a935c8 100644 --- a/src/Repositories/Crudable.php +++ b/src/Repositories/Crudable.php @@ -11,7 +11,6 @@ use Illuminate\Auth\Access\AuthorizationException; use Illuminate\Http\JsonResponse; use Illuminate\Pagination\AbstractPaginator; -use Illuminate\Support\Arr; use Illuminate\Support\Collection; use Illuminate\Support\Facades\DB; use Illuminate\Validation\ValidationException; diff --git a/src/Repositories/ResponseResolver.php b/src/Repositories/ResponseResolver.php index 3fb471a5a..55729c3c8 100644 --- a/src/Repositories/ResponseResolver.php +++ b/src/Repositories/ResponseResolver.php @@ -56,7 +56,7 @@ public function resolveDetailsRelationships($request) foreach ($relations as $relation) { if (in_array($relation, $this->resource::getWiths())) { /** - * @var AbstractPaginator $paginator + * @var AbstractPaginator */ $paginator = $this->resource->{$relation}()->paginate($request->get('relatablePerPage') ?? ($this->resource::$defaultRelatablePerPage ?? RestifySearchable::DEFAULT_RELATABLE_PER_PAGE)); /** * @var Builder $q */ diff --git a/src/RestifyCustomRoutesProvider.php b/src/RestifyCustomRoutesProvider.php index bd2d9153d..269143269 100644 --- a/src/RestifyCustomRoutesProvider.php +++ b/src/RestifyCustomRoutesProvider.php @@ -46,7 +46,7 @@ protected function registerRoutes() } Route::group([], function ($router) use ($repository, $config) { - if($repository === 'Binaryk\LaravelRestify\Tests\RepositoryWithRoutes') { + if ($repository === 'Binaryk\LaravelRestify\Tests\RepositoryWithRoutes') { } $repository::routes($router, $config); }); diff --git a/tests/RepositoryWithRoutesTest.php b/tests/RepositoryWithRoutesTest.php index 5a35f3414..53c0f0503 100644 --- a/tests/RepositoryWithRoutesTest.php +++ b/tests/RepositoryWithRoutesTest.php @@ -28,7 +28,7 @@ protected function setUp(): void public function test_can_add_custom_routes() { - $this->get(Restify::path(RepositoryWithRoutes::uriKey()) . '/main-testing')->assertStatus(200) + $this->get(Restify::path(RepositoryWithRoutes::uriKey()).'/main-testing')->assertStatus(200) ->assertJson([ 'success' => true, ]); @@ -135,7 +135,7 @@ public static function routes(Router $router, $options) { $options['namespace'] = 'Binaryk\LaravelRestify\Tests'; - $router->group($options,function ($router) { + $router->group($options, function ($router) { $router->get('custom-namespace', 'HandleController@sayHello')->name('namespace.route'); }); }