Skip to content

Commit

Permalink
code formatted and optimized
Browse files Browse the repository at this point in the history
  • Loading branch information
hafijul233 committed Feb 26, 2024
1 parent 147d05c commit bc21fff
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions src/Exceptions/GiftException.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
14 changes: 7 additions & 7 deletions src/GiftServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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()) {
Expand Down
2 changes: 1 addition & 1 deletion src/RouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});
}

Expand Down
24 changes: 12 additions & 12 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
}
}
}

0 comments on commit bc21fff

Please sign in to comment.