Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
alphaolomi committed Mar 3, 2022
1 parent b32c139 commit 1523214
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
16 changes: 10 additions & 6 deletions src/PesaServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
namespace Openpesa\Pesa;

use Illuminate\Support\Facades\Config;
use Throwable;
use Spatie\LaravelPackageTools\Package;
use Spatie\LaravelPackageTools\PackageServiceProvider;
use Openpesa\Pesa\Commands\PesaCommand;
use Openpesa\SDK\Pesa;
use Spatie\LaravelPackageTools\Package;
use Spatie\LaravelPackageTools\PackageServiceProvider;
use Throwable;

class PesaServiceProvider extends PackageServiceProvider
{
Expand All @@ -27,13 +27,17 @@ public function packageRegistered()
$apiKey = Config::get('laravel-pesa.api_key');
$env = Config::get('laravel-pesa.env');

if (is_null($publicKey)) throw new Throwable("InvalidConfiguration: PUBLIC KEY is required");
if (is_null($apiKey)) throw new Throwable("InvalidConfiguration: API KEY is required");
if (is_null($publicKey)) {
throw new Throwable("InvalidConfiguration: PUBLIC KEY is required");
}
if (is_null($apiKey)) {
throw new Throwable("InvalidConfiguration: API KEY is required");
}

return new Pesa([
'api_key' => $apiKey,
'public_key' => $publicKey,
'env' => $env
'env' => $env,
]);
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/functions.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

if (!function_exists('pesa')) {
if (! function_exists('pesa')) {

/**
* Get the pesa instance.
Expand Down
2 changes: 0 additions & 2 deletions tests/ExampleTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

use Openpesa\Pesa\Facades\Pesa;

it('can test', function () {
expect(true)->toBeTrue();
Expand All @@ -10,4 +9,3 @@
it('works', function () {
expect(true)->toBeTrue();
});

2 changes: 1 addition & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Openpesa\Pesa\Tests;

use Orchestra\Testbench\TestCase as Orchestra;
use Openpesa\Pesa\PesaServiceProvider;
use Orchestra\Testbench\TestCase as Orchestra;

class TestCase extends Orchestra
{
Expand Down

0 comments on commit 1523214

Please sign in to comment.