@@ -55,15 +55,15 @@ |
||
| 55 | 55 | $this->info('Laravel Monnify Package Installation Complete!'); |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | - private function writeChanges($path, string $key, string $configKey, $value){ |
|
| 58 | + private function writeChanges($path, string $key, string $configKey, $value) { |
|
| 59 | 59 | if (Str::contains(file_get_contents($path), "$key") === false) { |
| 60 | 60 | $this->info("Now writing .env with $key=$value ..."); |
| 61 | - file_put_contents($path, PHP_EOL."$key=$value".PHP_EOL, FILE_APPEND); |
|
| 62 | - }else{ |
|
| 61 | + file_put_contents($path, PHP_EOL . "$key=$value" . PHP_EOL, FILE_APPEND); |
|
| 62 | + } else { |
|
| 63 | 63 | $this->info("Now updating $key value in your .env to $value ..."); |
| 64 | 64 | // update existing entry |
| 65 | 65 | file_put_contents($path, str_replace( |
| 66 | - "$key=".$this->laravel['config']["monnify.$configKey"], |
|
| 66 | + "$key=" . $this->laravel['config']["monnify.$configKey"], |
|
| 67 | 67 | "$key=$value", file_get_contents($path) |
| 68 | 68 | )); |
| 69 | 69 | } |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | throw new MonnifyFailedRequestException($responseObject->responseMessage ?? "Path '{$responseObject->path}' {$responseObject->error}", $responseObject->responseCode ?? $responseObject->status); |
| 106 | 106 | |
| 107 | 107 | $this->oAuth2Token = $responseObject->responseBody->accessToken; |
| 108 | - $this->oAuth2TokenExpires = ((time() + $responseObject->responseBody->expiresIn) - 60);//Just make sure the token would not expire in 60 secs |
|
| 108 | + $this->oAuth2TokenExpires = ((time() + $responseObject->responseBody->expiresIn) - 60); //Just make sure the token would not expire in 60 secs |
|
| 109 | 109 | |
| 110 | 110 | return $this; |
| 111 | 111 | } |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | 'accountNumber' => $accountNumber, |
| 199 | 199 | 'email' => $email, |
| 200 | 200 | 'defaultSplitPercentage' => $splitPercentage, |
| 201 | - ],]); |
|
| 201 | + ], ]); |
|
| 202 | 202 | |
| 203 | 203 | $responseObject = json_decode($response->body()); |
| 204 | 204 | if (!$response->successful()) |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | private function __construct(MonnifyBankAccount ...$monnifyBankAccounts) |
| 25 | 25 | { |
| 26 | - foreach ($monnifyBankAccounts as $account){ |
|
| 26 | + foreach ($monnifyBankAccounts as $account) { |
|
| 27 | 27 | $this->bankAccounts[] = $account->getBankCodeAndAccountNumber(); |
| 28 | 28 | $this->accountNames[] = $account->getAccountName(); |
| 29 | 29 | } |
@@ -30,14 +30,14 @@ |
||
| 30 | 30 | public static function BREAK(): MonnifyOnFailureValidate |
| 31 | 31 | { |
| 32 | 32 | if (!key_exists(self::BREAK, self::$cache)) |
| 33 | - self::$cache[self::BREAK] = new MonnifyOnFailureValidate( self::BREAK); |
|
| 33 | + self::$cache[self::BREAK] = new MonnifyOnFailureValidate(self::BREAK); |
|
| 34 | 34 | return self::$cache[self::BREAK]; |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | public static function CONTINUE(): MonnifyOnFailureValidate |
| 38 | 38 | { |
| 39 | 39 | if (!key_exists(self::CONTINUE, self::$cache)) |
| 40 | - self::$cache[self::CONTINUE] = new MonnifyOnFailureValidate( self::CONTINUE); |
|
| 40 | + self::$cache[self::CONTINUE] = new MonnifyOnFailureValidate(self::CONTINUE); |
|
| 41 | 41 | return self::$cache[self::CONTINUE]; |
| 42 | 42 | } |
| 43 | 43 | |