Skip to content

Commit

Permalink
./vendor/bin/pint
Browse files Browse the repository at this point in the history
  • Loading branch information
HPWebdeveloper committed Jan 11, 2024
1 parent 15f2db5 commit f0dcea0
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Exceptions/InsufficientBalanceException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class InsufficientBalanceException extends Exception
* @param string $message
* @param int $code
*/
public function __construct($message = 'Insufficient balance to cover the order', $code = 0, \Throwable $previous = null)
public function __construct($message = 'Insufficient balance to cover the order', $code = 0, ?\Throwable $previous = null)
{
parent::__construct($message, $code, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/InvalidDepositException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class InvalidDepositException extends Exception
* @param string $message
* @param int $code
*/
public function __construct($message = 'Invalid deposit operation', $code = 0, \Throwable $previous = null)
public function __construct($message = 'Invalid deposit operation', $code = 0, ?\Throwable $previous = null)
{
parent::__construct($message, $code, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/InvalidValueException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class InvalidValueException extends Exception
* @param string $message
* @param int $code
*/
public function __construct($message = 'Invalie value to deposit', $code = 0, \Throwable $previous = null)
public function __construct($message = 'Invalie value to deposit', $code = 0, ?\Throwable $previous = null)
{
parent::__construct($message, $code, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/InvalidWalletTypeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class InvalidWalletTypeException extends Exception
{
public function __construct($message = 'Invalid wallet type', $code = 0, \Throwable $previous = null)
public function __construct($message = 'Invalid wallet type', $code = 0, ?\Throwable $previous = null)
{
parent::__construct($message, $code, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/WalletNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class WalletNotFoundException extends Exception
{
public function __construct($message = 'Wallet not found', $code = 0, \Throwable $previous = null)
public function __construct($message = 'Wallet not found', $code = 0, ?\Throwable $previous = null)
{
parent::__construct($message, $code, $previous);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Interfaces/WalletOperations.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public function getWalletBalanceByType(string $walletType);

public function hasSufficientBalance($value): bool;

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

public function deposit(string $type, int|float $amount, string $notes = null): bool;
public function deposit(string $type, int|float $amount, ?string $notes = null): bool;
}
2 changes: 1 addition & 1 deletion src/Traits/HandlesDeposit.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ trait HandlesDeposit
/**
* Deposit an amount to the user's wallet of a specific type.
*/
public function deposit(string $type, int|float $amount, string $notes = null): bool
public function deposit(string $type, int|float $amount, ?string $notes = null): bool
{
$depositable = $this->getDepositableTypes();

Expand Down
2 changes: 1 addition & 1 deletion src/Traits/HandlesPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ trait HandlesPayment
*
* @throws InsufficientBalanceException
*/
public function pay(int|float $orderValue, string $notes = null): void
public function pay(int|float $orderValue, ?string $notes = null): void
{
if (! $this->hasSufficientBalance($orderValue)) {
throw new InsufficientBalanceException('Insufficient balance to cover the order.');
Expand Down

0 comments on commit f0dcea0

Please sign in to comment.