Skip to content

Commit f0dcea0

Browse files
./vendor/bin/pint
1 parent 15f2db5 commit f0dcea0

8 files changed

+9
-9
lines changed

src/Exceptions/InsufficientBalanceException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class InsufficientBalanceException extends Exception
1212
* @param string $message
1313
* @param int $code
1414
*/
15-
public function __construct($message = 'Insufficient balance to cover the order', $code = 0, \Throwable $previous = null)
15+
public function __construct($message = 'Insufficient balance to cover the order', $code = 0, ?\Throwable $previous = null)
1616
{
1717
parent::__construct($message, $code, $previous);
1818
}

src/Exceptions/InvalidDepositException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class InvalidDepositException extends Exception
1212
* @param string $message
1313
* @param int $code
1414
*/
15-
public function __construct($message = 'Invalid deposit operation', $code = 0, \Throwable $previous = null)
15+
public function __construct($message = 'Invalid deposit operation', $code = 0, ?\Throwable $previous = null)
1616
{
1717
parent::__construct($message, $code, $previous);
1818
}

src/Exceptions/InvalidValueException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class InvalidValueException extends Exception
1212
* @param string $message
1313
* @param int $code
1414
*/
15-
public function __construct($message = 'Invalie value to deposit', $code = 0, \Throwable $previous = null)
15+
public function __construct($message = 'Invalie value to deposit', $code = 0, ?\Throwable $previous = null)
1616
{
1717
parent::__construct($message, $code, $previous);
1818
}

src/Exceptions/InvalidWalletTypeException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class InvalidWalletTypeException extends Exception
88
{
9-
public function __construct($message = 'Invalid wallet type', $code = 0, \Throwable $previous = null)
9+
public function __construct($message = 'Invalid wallet type', $code = 0, ?\Throwable $previous = null)
1010
{
1111
parent::__construct($message, $code, $previous);
1212
}

src/Exceptions/WalletNotFoundException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class WalletNotFoundException extends Exception
88
{
9-
public function __construct($message = 'Wallet not found', $code = 0, \Throwable $previous = null)
9+
public function __construct($message = 'Wallet not found', $code = 0, ?\Throwable $previous = null)
1010
{
1111
parent::__construct($message, $code, $previous);
1212
}

src/Interfaces/WalletOperations.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public function getWalletBalanceByType(string $walletType);
1010

1111
public function hasSufficientBalance($value): bool;
1212

13-
public function pay(int|float $orderValue, string $notes = null);
13+
public function pay(int|float $orderValue, ?string $notes = null);
1414

15-
public function deposit(string $type, int|float $amount, string $notes = null): bool;
15+
public function deposit(string $type, int|float $amount, ?string $notes = null): bool;
1616
}

src/Traits/HandlesDeposit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ trait HandlesDeposit
1515
/**
1616
* Deposit an amount to the user's wallet of a specific type.
1717
*/
18-
public function deposit(string $type, int|float $amount, string $notes = null): bool
18+
public function deposit(string $type, int|float $amount, ?string $notes = null): bool
1919
{
2020
$depositable = $this->getDepositableTypes();
2121

src/Traits/HandlesPayment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ trait HandlesPayment
1313
*
1414
* @throws InsufficientBalanceException
1515
*/
16-
public function pay(int|float $orderValue, string $notes = null): void
16+
public function pay(int|float $orderValue, ?string $notes = null): void
1717
{
1818
if (! $this->hasSufficientBalance($orderValue)) {
1919
throw new InsufficientBalanceException('Insufficient balance to cover the order.');

0 commit comments

Comments
 (0)