Skip to content

Commit 15bcd01

Browse files
authored
Merge pull request #11 from bowphp/code-formatting
Fix php core lang
2 parents 2c55947 + cad36a0 commit 15bcd01

16 files changed

Lines changed: 38 additions & 38 deletions

.github/workflows/php.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: PHP Composer
22

33
on:
44
push:
5-
branches: [ "master" ]
5+
branches: [ "main" ]
66
pull_request:
7-
branches: [ "master" ]
7+
branches: [ "main" ]
88

99
permissions:
1010
contents: read

docs/en.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,9 @@ $status = $gateway->verify([
332332
### MTN Mobile Money Direct Usage
333333

334334
```php
335-
use Bow\Payment\Gateway\IvoryCost\MTNMobileMoney\MTNMobileMoneyGateway;
336-
use Bow\Payment\Gateway\IvoryCost\MTNMobileMoney\MomoEnvironment;
337-
use Bow\Payment\Gateway\IvoryCost\MTNMobileMoney\MomoTokenGenerator;
335+
use Bow\Payment\Gateway\IvoryCost\Mono\MonoGateway;
336+
use Bow\Payment\Gateway\IvoryCost\Mono\MomoEnvironment;
337+
use Bow\Payment\Gateway\IvoryCost\Mono\MomoTokenGenerator;
338338

339339
$config = [
340340
'subscription_key' => 'YOUR_SUBSCRIPTION_KEY',
@@ -351,7 +351,7 @@ $tokenGenerator = new MomoTokenGenerator(
351351
$environment
352352
);
353353

354-
$gateway = new MTNMobileMoneyGateway($tokenGenerator, $config, $environment);
354+
$gateway = new MonoGateway($tokenGenerator, $config, $environment);
355355

356356
$result = $gateway->payment([
357357
'amount' => 1000,

docs/fr.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,9 @@ $status = $gateway->verify([
332332
### Utilisation Directe de MTN Mobile Money
333333

334334
```php
335-
use Bow\Payment\Gateway\IvoryCost\MTNMobileMoney\MTNMobileMoneyGateway;
336-
use Bow\Payment\Gateway\IvoryCost\MTNMobileMoney\MomoEnvironment;
337-
use Bow\Payment\Gateway\IvoryCost\MTNMobileMoney\MomoTokenGenerator;
335+
use Bow\Payment\Gateway\IvoryCost\Mono\MonoGateway;
336+
use Bow\Payment\Gateway\IvoryCost\Mono\MomoEnvironment;
337+
use Bow\Payment\Gateway\IvoryCost\Mono\MomoTokenGenerator;
338338

339339
$config = [
340340
'subscription_key' => 'VOTRE_SUBSCRIPTION_KEY',
@@ -351,7 +351,7 @@ $tokenGenerator = new MomoTokenGenerator(
351351
$environment
352352
);
353353

354-
$gateway = new MTNMobileMoneyGateway($tokenGenerator, $config, $environment);
354+
$gateway = new MonoGateway($tokenGenerator, $config, $environment);
355355

356356
$result = $gateway->payment([
357357
'amount' => 1000,

src/Exceptions/PaymentException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ class PaymentException extends Exception
1414
*
1515
* @param string $message
1616
* @param int $code
17-
* @param Exception|null $previous
17+
* @param ?Exception $previous
1818
*/
19-
public function __construct(string $message = "", int $code = 0, Exception $previous = null)
19+
public function __construct(string $message = "", int $code = 0, ?Exception $previous = null)
2020
{
2121
parent::__construct($message, $code, $previous);
2222
}

src/Exceptions/PaymentRequestException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ class PaymentRequestException extends PaymentException
1212
*
1313
* @param string $message
1414
* @param int $code
15-
* @param \Exception|null $previous
15+
* @param ?\Exception $previous
1616
*/
17-
public function __construct(string $message, int $code = 500, \Exception $previous = null)
17+
public function __construct(string $message, int $code = 500, ?\Exception $previous = null)
1818
{
1919
parent::__construct("Payment request failed: {$message}", $code, $previous);
2020
}

src/Exceptions/TokenGenerationException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ class TokenGenerationException extends PaymentException
1111
* Create a new token generation exception
1212
*
1313
* @param string $provider
14-
* @param \Exception|null $previous
14+
* @param ?\Exception $previous
1515
*/
16-
public function __construct(string $provider = '', \Exception $previous = null)
16+
public function __construct(string $provider = '', ?\Exception $previous = null)
1717
{
1818
$message = $provider
1919
? "Failed to generate authentication token for {$provider}"

src/Exceptions/TransactionVerificationException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ class TransactionVerificationException extends PaymentException
1111
* Create a new transaction verification exception
1212
*
1313
* @param string $transactionId
14-
* @param \Exception|null $previous
14+
* @param ?\Exception $previous
1515
*/
16-
public function __construct(string $transactionId = '', \Exception $previous = null)
16+
public function __construct(string $transactionId = '', ?\Exception $previous = null)
1717
{
1818
$message = $transactionId
1919
? "Failed to verify transaction [{$transactionId}]"

src/Gateway/IvoryCost/MTNMobileMoney/Collection/MomoPayment.php renamed to src/Gateway/IvoryCost/Mono/Collection/MomoPayment.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22

3-
namespace Bow\Payment\Gateway\IvoryCost\MTNMobileMoney\Collection;
3+
namespace Bow\Payment\Gateway\IvoryCost\Mono\Collection;
44

55
use Bow\Payment\Common\Utils;
66
use GuzzleHttp\Client as HttpClient;
7-
use Bow\Payment\Gateway\IvoryCost\MTNMobileMoney\MomoToken;
8-
use Bow\Payment\Gateway\IvoryCost\MTNMobileMoney\MomoEnvironment;
7+
use Bow\Payment\Gateway\IvoryCost\Mono\MomoToken;
8+
use Bow\Payment\Gateway\IvoryCost\Mono\MomoEnvironment;
99
use Bow\Payment\Exceptions\PaymentRequestException;
1010

1111
class MomoPayment

src/Gateway/IvoryCost/MTNMobileMoney/Collection/MomoPaymentStatus.php renamed to src/Gateway/IvoryCost/Mono/Collection/MomoPaymentStatus.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Bow\Payment\Gateway\IvoryCost\MTNMobileMoney\Collection;
3+
namespace Bow\Payment\Gateway\IvoryCost\Mono\Collection;
44

55
use Bow\Payment\Common\ProcessorStatusInterface;
66

src/Gateway/IvoryCost/MTNMobileMoney/Collection/MomoTransaction.php renamed to src/Gateway/IvoryCost/Mono/Collection/MomoTransaction.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3-
namespace Bow\Payment\Gateway\IvoryCost\MTNMobileMoney\Collection;
3+
namespace Bow\Payment\Gateway\IvoryCost\Mono\Collection;
44

55
use GuzzleHttp\Client as HttpClient;
6-
use Bow\Payment\Gateway\IvoryCost\MTNMobileMoney\MomoToken;
7-
use Bow\Payment\Gateway\IvoryCost\MTNMobileMoney\MomoEnvironment;
6+
use Bow\Payment\Gateway\IvoryCost\Mono\MomoToken;
7+
use Bow\Payment\Gateway\IvoryCost\Mono\MomoEnvironment;
88
use Bow\Payment\Exceptions\TransactionVerificationException;
99

1010
class MomoTransaction

0 commit comments

Comments
 (0)