Skip to content

Commit bcb7d13

Browse files
committed
cleanup / pint
1 parent 6c3bd62 commit bcb7d13

4 files changed

+7
-18
lines changed

src/ConvergeException.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@
22

33
namespace Treestoneit\LaravelConvergeApi;
44

5-
class ConvergeException extends \Exception
6-
{
7-
}
5+
class ConvergeException extends \Exception {}

src/ConvergeRequest.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function request($transactionType, array $parameters): array
5050
*
5151
* @throws ConvergeException
5252
*/
53-
private function validateSettings(array $settings): bool
53+
private function validateSettings(array $settings): void
5454
{
5555
if (! isset($settings['merchant_id'])) {
5656
throw new ConvergeException('Please provide a valid merchant id in settings.');
@@ -62,7 +62,6 @@ private function validateSettings(array $settings): bool
6262
throw new ConvergeException('Please provide a valid pin in settings.');
6363
}
6464

65-
return true;
6665
}
6766

6867
private function httpRequest($parameters): array

src/LaravelConvergeApiFacade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010
class LaravelConvergeApiFacade extends Facade
1111
{
12-
protected static function getFacadeAccessor()
12+
protected static function getFacadeAccessor(): string
1313
{
1414
return 'converge';
1515
}

src/LaravelConvergeApiServiceProvider.php

+4-12
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ class LaravelConvergeApiServiceProvider extends ServiceProvider
88
{
99
/**
1010
* Indicates if loading of the provider is deferred.
11-
*
12-
* @var bool
1311
*/
14-
protected $defer = false;
12+
protected bool $defer = false;
1513

1614
public function boot()
1715
{
@@ -24,27 +22,21 @@ public function boot()
2422

2523
/**
2624
* Register the service provider.
27-
*
28-
* @return void
2925
*/
30-
public function register()
26+
public function register(): void
3127
{
3228
$this->mergeConfigFrom(
3329
__DIR__.'/../config/converge-api.php',
3430
'converge-api'
3531
);
3632

37-
$this->app->bind('converge', function ($app) {
38-
return new Converge();
39-
});
33+
$this->app->bind('converge', fn () => new Converge);
4034
}
4135

4236
/**
4337
* Get the services provided by the provider.
44-
*
45-
* @return array
4638
*/
47-
public function provides()
39+
public function provides(): array
4840
{
4941
return ['converge'];
5042
}

0 commit comments

Comments
 (0)