Skip to content

Commit

Permalink
cleanup / pint
Browse files Browse the repository at this point in the history
  • Loading branch information
bomshteyn committed Oct 29, 2024
1 parent 6c3bd62 commit bcb7d13
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 18 deletions.
4 changes: 1 addition & 3 deletions src/ConvergeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace Treestoneit\LaravelConvergeApi;

class ConvergeException extends \Exception
{
}
class ConvergeException extends \Exception {}
3 changes: 1 addition & 2 deletions src/ConvergeRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/LaravelConvergeApiFacade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
class LaravelConvergeApiFacade extends Facade
{
protected static function getFacadeAccessor()
protected static function getFacadeAccessor(): string
{
return 'converge';
}
Expand Down
16 changes: 4 additions & 12 deletions src/LaravelConvergeApiServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand All @@ -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'];
}
Expand Down

0 comments on commit bcb7d13

Please sign in to comment.