diff --git a/src/ConvergeException.php b/src/ConvergeException.php index cbf8b5b..4989639 100644 --- a/src/ConvergeException.php +++ b/src/ConvergeException.php @@ -2,6 +2,4 @@ namespace Treestoneit\LaravelConvergeApi; -class ConvergeException extends \Exception -{ -} +class ConvergeException extends \Exception {} diff --git a/src/ConvergeRequest.php b/src/ConvergeRequest.php index 7a465bc..93cdd7f 100644 --- a/src/ConvergeRequest.php +++ b/src/ConvergeRequest.php @@ -50,7 +50,7 @@ public function request($transactionType, array $parameters): array * * @throws ConvergeException */ - private function validateSettings(array $settings): bool + private function validateSettings(array $settings): void { if (! isset($settings['merchant_id'])) { throw new ConvergeException('Please provide a valid merchant id in settings.'); @@ -62,7 +62,6 @@ private function validateSettings(array $settings): bool throw new ConvergeException('Please provide a valid pin in settings.'); } - return true; } private function httpRequest($parameters): array diff --git a/src/LaravelConvergeApiFacade.php b/src/LaravelConvergeApiFacade.php index b342db3..0f48147 100644 --- a/src/LaravelConvergeApiFacade.php +++ b/src/LaravelConvergeApiFacade.php @@ -9,7 +9,7 @@ */ class LaravelConvergeApiFacade extends Facade { - protected static function getFacadeAccessor() + protected static function getFacadeAccessor(): string { return 'converge'; } diff --git a/src/LaravelConvergeApiServiceProvider.php b/src/LaravelConvergeApiServiceProvider.php index 0253ee5..27ed8a8 100644 --- a/src/LaravelConvergeApiServiceProvider.php +++ b/src/LaravelConvergeApiServiceProvider.php @@ -8,10 +8,8 @@ class LaravelConvergeApiServiceProvider extends ServiceProvider { /** * Indicates if loading of the provider is deferred. - * - * @var bool */ - protected $defer = false; + protected bool $defer = false; public function boot() { @@ -24,27 +22,21 @@ public function boot() /** * Register the service provider. - * - * @return void */ - public function register() + public function register(): void { $this->mergeConfigFrom( __DIR__.'/../config/converge-api.php', 'converge-api' ); - $this->app->bind('converge', function ($app) { - return new Converge(); - }); + $this->app->bind('converge', fn () => new Converge); } /** * Get the services provided by the provider. - * - * @return array */ - public function provides() + public function provides(): array { return ['converge']; }