Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
mtvbrianking committed Aug 17, 2019
1 parent 7239086 commit 539659f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/Console/RegisterIdCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function handle()

$this->product = $this->option('product');

if(!$this->product) {
if (! $this->product) {
$this->product = $this->laravel['config']->get('mtn-momo.product');
}

Expand Down
2 changes: 1 addition & 1 deletion src/Console/RequestSecretCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function handle()

$this->product = $this->option('product');

if(!$this->product) {
if (! $this->product) {
$this->product = $this->laravel['config']->get('mtn-momo.product');
}

Expand Down
2 changes: 1 addition & 1 deletion src/Console/ValidateIdCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function handle()

$product = $this->option('product');

if(!$product) {
if (! $product) {
$product = $this->laravel['config']->get('mtn-momo.product');
}

Expand Down
10 changes: 1 addition & 9 deletions src/MtnMomoServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,14 @@

namespace Bmatovu\MtnMomo;

use Monolog\Logger;
use GuzzleHttp\Client;
use GuzzleHttp\Middleware;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\MessageFormatter;
use Monolog\Handler\StreamHandler;
use Bmatovu\MtnMomo\Products\Product;
use Illuminate\Support\ServiceProvider;
use Bmatovu\OAuthNegotiator\OAuth2Middleware;
use Bmatovu\MtnMomo\Console\BootstrapCommand;
use Bmatovu\MtnMomo\Console\RegisterIdCommand;
use Bmatovu\MtnMomo\Console\ValidateIdCommand;
use Bmatovu\MtnMomo\Console\RequestSecretCommand;
use Bmatovu\MtnMomo\Repositories\TokenRepository;
use Bmatovu\OAuthNegotiator\GrantTypes\ClientCredentials;

/**
* Class MtnMomoServiceProvider.
Expand Down Expand Up @@ -59,7 +51,7 @@ public function register()
{
$this->mergeConfigFrom(__DIR__.'/../config/mtn-momo.php', 'mtn-momo');

$this->app->bind(ClientInterface::class, function() {
$this->app->bind(ClientInterface::class, function () {
return $this->commandClient();
});
}
Expand Down
5 changes: 3 additions & 2 deletions src/Products/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,9 @@ public function __construct($headers = [], $middlewares = [], ClientInterface $c
// Set defaults.
$this->setConfigurations();

if($client) {
if ($client) {
$this->client = $client;

return;
}

Expand All @@ -314,7 +315,7 @@ public function __construct($headers = [], $middlewares = [], ClientInterface $c

$handlerStack->push($this->getAuthBroker($headers));

if($this->config->get('app.debug')) {
if ($this->config->get('app.debug')) {
$handlerStack->push($this->getLogMiddleware());
}

Expand Down

0 comments on commit 539659f

Please sign in to comment.