From c815d89ca8f0db6f144c41d78812573aa0dc0a9f Mon Sep 17 00:00:00 2001 From: Lupacescu Eduard Date: Thu, 16 Jan 2020 12:07:24 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/Repositories/Repository.php | 2 +- src/RestifyServiceProvider.php | 4 ++-- tests/Fixtures/RepositoryWithRoutes.php | 1 - tests/RepositoryWithRoutesTest.php | 9 ++++----- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/Repositories/Repository.php b/src/Repositories/Repository.php index be0dc1a91..3a2bc64cd 100644 --- a/src/Repositories/Repository.php +++ b/src/Repositories/Repository.php @@ -176,7 +176,7 @@ public static function __callStatic($method, $parameters) * Defining custom roues. * The prefix of this route is the uriKey (e.g. 'restify-api/orders'), * The namespace is Http/Controllers - * Middlewares are the same from config('restify.middleware') + * Middlewares are the same from config('restify.middleware'). * * However all options could be customized by passing an $options argument * diff --git a/src/RestifyServiceProvider.php b/src/RestifyServiceProvider.php index 8eebe0f4b..464ecd55e 100644 --- a/src/RestifyServiceProvider.php +++ b/src/RestifyServiceProvider.php @@ -45,7 +45,7 @@ public function customDefinitions() { collect(Restify::$repositories)->each(function ($repository) { $config = [ - 'namespace' => trim(app()->getNamespace(), '\\') . '\Http\Controllers', + 'namespace' => trim(app()->getNamespace(), '\\').'\Http\Controllers', 'as' => '', 'prefix' => Restify::path($repository::uriKey()), 'middleware' => config('restify.middleware', []), @@ -76,7 +76,7 @@ public function customDefinitions() public function defaultRoutes($config) { Route::group($config, function () { - $this->loadRoutesFrom(__DIR__ . '/../routes/api.php'); + $this->loadRoutesFrom(__DIR__.'/../routes/api.php'); }); return $this; diff --git a/tests/Fixtures/RepositoryWithRoutes.php b/tests/Fixtures/RepositoryWithRoutes.php index ecdb86a04..421536851 100644 --- a/tests/Fixtures/RepositoryWithRoutes.php +++ b/tests/Fixtures/RepositoryWithRoutes.php @@ -6,7 +6,6 @@ use Illuminate\Routing\Router; /** - * @package Binaryk\LaravelRestify\Tests\Fixtures; * @author Eduard Lupacescu */ class RepositoryWithRoutes extends Repository diff --git a/tests/RepositoryWithRoutesTest.php b/tests/RepositoryWithRoutesTest.php index b6cad1f46..b8b8eda6f 100644 --- a/tests/RepositoryWithRoutesTest.php +++ b/tests/RepositoryWithRoutesTest.php @@ -8,7 +8,6 @@ use Illuminate\Routing\Router; /** - * @package Binaryk\LaravelRestify\Tests; * @author Eduard Lupacescu */ class RepositoryWithRoutesTest extends IntegrationTest @@ -28,7 +27,7 @@ protected function setUp(): void public function test_can_add_custom_routes() { - $this->get(Restify::path(RepositoryWithRoutes::uriKey()) . '/testing')->assertStatus(200) + $this->get(Restify::path(RepositoryWithRoutes::uriKey()).'/testing')->assertStatus(200) ->assertJson([ 'success' => true, ]); @@ -62,7 +61,6 @@ public function test_can_use_custom_namespace() ], ]); } - } class WithCustomPrefix extends RepositoryWithRoutes @@ -109,9 +107,10 @@ public static function routes(Router $router, $options = [ } } -class HandleController extends RestController { +class HandleController extends RestController +{ /** - * Just saying hello + * Just saying hello. * * @return \Binaryk\LaravelRestify\Controllers\RestResponse */