diff --git a/src/Exceptions/GiftException.php b/src/Exceptions/GiftException.php index 39aacf1..9cbb67c 100644 --- a/src/Exceptions/GiftException.php +++ b/src/Exceptions/GiftException.php @@ -13,8 +13,8 @@ class GiftException extends Exception /** * CoreException constructor. * - * @param string $message - * @param int $code + * @param string $message + * @param int $code */ public function __construct($message = '', $code = 0, ?Throwable $previous = null) { diff --git a/src/GiftServiceProvider.php b/src/GiftServiceProvider.php index a4735d7..a93187c 100644 --- a/src/GiftServiceProvider.php +++ b/src/GiftServiceProvider.php @@ -16,7 +16,7 @@ class GiftServiceProvider extends ServiceProvider public function register() { $this->mergeConfigFrom( - __DIR__.'/../config/gift.php', 'fintech.gift' + __DIR__ . '/../config/gift.php', 'fintech.gift' ); $this->app->register(RouteServiceProvider::class); @@ -29,21 +29,21 @@ public function register() public function boot(): void { $this->publishes([ - __DIR__.'/../config/gift.php' => config_path('fintech/gift.php'), + __DIR__ . '/../config/gift.php' => config_path('fintech/gift.php'), ]); - $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); + $this->loadMigrationsFrom(__DIR__ . '/../database/migrations'); - $this->loadTranslationsFrom(__DIR__.'/../lang', 'gift'); + $this->loadTranslationsFrom(__DIR__ . '/../lang', 'gift'); $this->publishes([ - __DIR__.'/../lang' => $this->app->langPath('vendor/gift'), + __DIR__ . '/../lang' => $this->app->langPath('vendor/gift'), ]); - $this->loadViewsFrom(__DIR__.'/../resources/views', 'gift'); + $this->loadViewsFrom(__DIR__ . '/../resources/views', 'gift'); $this->publishes([ - __DIR__.'/../resources/views' => resource_path('views/vendor/gift'), + __DIR__ . '/../resources/views' => resource_path('views/vendor/gift'), ]); if ($this->app->runningInConsole()) { diff --git a/src/RouteServiceProvider.php b/src/RouteServiceProvider.php index 2a2b205..8fdf577 100644 --- a/src/RouteServiceProvider.php +++ b/src/RouteServiceProvider.php @@ -26,7 +26,7 @@ public function boot() Route::prefix("{$root_prefix}api") ->middleware('api') ->namespace($this->namespace) - ->group(__DIR__.'/../routes/api.php'); + ->group(__DIR__ . '/../routes/api.php'); }); } diff --git a/tests/TestCase.php b/tests/TestCase.php index 65e7ca2..64e417d 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -10,6 +10,18 @@ class TestCase extends Orchestra { use DatabaseMigrations; + public function getEnvironmentSetUp($app): void + { + config()->set('app.env', 'testing'); + config()->set('database.default', 'testing'); + + $migrations = [ + ]; + foreach ($migrations as $migration) { + $migration->up(); + } + } + protected function setUp(): void { parent::setUp(); @@ -24,16 +36,4 @@ protected function getPackageProviders($app): array GiftServiceProvider::class, ]; } - - public function getEnvironmentSetUp($app): void - { - config()->set('app.env', 'testing'); - config()->set('database.default', 'testing'); - - $migrations = [ - ]; - foreach ($migrations as $migration) { - $migration->up(); - } - } }