mirror of
https://github.com/archtechx/money.git
synced 2025-12-16 04:44:03 +00:00
Initial commit
This commit is contained in:
commit
8847454577
33 changed files with 2435 additions and 0 deletions
15
src/Exceptions/CurrencyDoesNotExistException.php
Normal file
15
src/Exceptions/CurrencyDoesNotExistException.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ArchTech\Money\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class CurrencyDoesNotExistException extends Exception
|
||||
{
|
||||
public function __construct(string $code)
|
||||
{
|
||||
parent::__construct("The $code currency does not exist.");
|
||||
}
|
||||
}
|
||||
15
src/Exceptions/InvalidCurrencyException.php
Normal file
15
src/Exceptions/InvalidCurrencyException.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ArchTech\Money\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class InvalidCurrencyException extends Exception
|
||||
{
|
||||
public function __construct(string $message = null)
|
||||
{
|
||||
parent::__construct($message ?? 'The currency is invalid');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue