diff --git a/src/Events/TokenReceived.php b/src/Events/TokenReceived.php index f706a8b..ee79c4c 100644 --- a/src/Events/TokenReceived.php +++ b/src/Events/TokenReceived.php @@ -1,21 +1,24 @@ order... - } - } \ No newline at end of file + /** + * Handle the event. + */ + public function handle(TransactionIdReceived $event): void + { + // Access the order using $event->order... + } + } diff --git a/src/Listeners/StoreTokenOnDB.php b/src/Listeners/StoreTokenOnDB.php index ba0a08a..f890b80 100644 --- a/src/Listeners/StoreTokenOnDB.php +++ b/src/Listeners/StoreTokenOnDB.php @@ -1,21 +1,24 @@ order... - } - } \ No newline at end of file + /** + * Handle the event. + */ + public function handle(TokenReceived $event): void + { + // Access the order using $event->order... + } + } diff --git a/src/Listeners/StoreTransIdOnDB.php b/src/Listeners/StoreTransIdOnDB.php index bb44351..14bd27b 100644 --- a/src/Listeners/StoreTransIdOnDB.php +++ b/src/Listeners/StoreTransIdOnDB.php @@ -1,21 +1,24 @@ order... - } - } \ No newline at end of file + /** + * Handle the event. + */ + public function handle(TransactionIdReceived $event): void + { + // Access the order using $event->order... + } + } diff --git a/src/LyraServiceProvider.php b/src/LyraServiceProvider.php index 9724047..1d18d0c 100644 --- a/src/LyraServiceProvider.php +++ b/src/LyraServiceProvider.php @@ -11,66 +11,72 @@ use Illuminate\Support\Facades\Route; use Illuminate\Support\ServiceProvider; -class LyraServiceProvider extends ServiceProvider { - /** - * Register any application services. - * - * @return void - */ - public function register() { - // - } +class LyraServiceProvider extends ServiceProvider +{ + /** + * Register any application services. + * + * @return void + */ + public function register() + { + // + } - /** - * Bootstrap any application services. - * - * @return void - */ - public function boot() { - $this->loadMigrationsFrom( __DIR__ . '/../database/migrations' ); - $this->mergeConfigFrom( __DIR__ . '/../config/config.php', 'lyra' ); + /** + * Bootstrap any application services. + * + * @return void + */ + public function boot() + { + $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); + $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'lyra'); - $this->registerRoutes(); - if ( $this->app->runningInConsole() ) { - $this->registerCommands(); - $this->registerPublishes(); - } + $this->registerRoutes(); + if ($this->app->runningInConsole()) { + $this->registerCommands(); + $this->registerPublishes(); + } - Event::listen( TokenReceived::class, [ StoreTokenOnDB::class ] ); - Event::listen( TransactionIdReceived::class, [ - CheckTransIdIsUnique::class, - StoreTransIdOnDB::class - ] ); - } + Event::listen(TokenReceived::class, [StoreTokenOnDB::class]); + Event::listen(TransactionIdReceived::class, [ + CheckTransIdIsUnique::class, + StoreTransIdOnDB::class, + ]); + } - /** - * Define routes setup. - * - * @return void - */ - private function registerRoutes() { - Route::prefix( 'lyra' )->middleware( 'api' )->group( __DIR__ . '/../routes/api.php' ); - } + /** + * Define routes setup. + * + * @return void + */ + private function registerRoutes() + { + Route::prefix('lyra')->middleware('api')->group(__DIR__.'/../routes/api.php'); + } - /** - * Register created commands. - * - * @return void - */ - private function registerCommands() { - $this->commands( [ - // commands register here - ] ); - } + /** + * Register created commands. + * + * @return void + */ + private function registerCommands() + { + $this->commands([ + // commands register here + ]); + } - /** - * Register publishable files. - * - * @return void - */ - private function registerPublishes() { - $this->publishes( [ - __DIR__ . '/../config/config.php' => config_path( 'lyra.php' ), - ], 'lyra-config' ); - } + /** + * Register publishable files. + * + * @return void + */ + private function registerPublishes() + { + $this->publishes([ + __DIR__.'/../config/config.php' => config_path('lyra.php'), + ], 'lyra-config'); + } }