allow vendord
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m3s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Successful in 32s
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 1s
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m3s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Successful in 32s
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 1s
This commit is contained in:
9
vendor/moneyphp/money/src/Exception/CurrencyMismatchException.php
vendored
Normal file
9
vendor/moneyphp/money/src/Exception/CurrencyMismatchException.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Money\Exception;
|
||||
|
||||
final class CurrencyMismatchException extends InvalidArgumentException
|
||||
{
|
||||
}
|
||||
9
vendor/moneyphp/money/src/Exception/DivisionByZeroException.php
vendored
Normal file
9
vendor/moneyphp/money/src/Exception/DivisionByZeroException.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Money\Exception;
|
||||
|
||||
final class DivisionByZeroException extends InvalidArgumentException
|
||||
{
|
||||
}
|
||||
15
vendor/moneyphp/money/src/Exception/FormatterException.php
vendored
Normal file
15
vendor/moneyphp/money/src/Exception/FormatterException.php
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Money\Exception;
|
||||
|
||||
use Money\Exception;
|
||||
use RuntimeException;
|
||||
|
||||
/**
|
||||
* Thrown when a Money object cannot be formatted into a string.
|
||||
*/
|
||||
final class FormatterException extends RuntimeException implements Exception
|
||||
{
|
||||
}
|
||||
32
vendor/moneyphp/money/src/Exception/InvalidArgumentException.php
vendored
Normal file
32
vendor/moneyphp/money/src/Exception/InvalidArgumentException.php
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Money\Exception;
|
||||
|
||||
use InvalidArgumentException as CoreInvalidArgumentException;
|
||||
use Money\Exception;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
class InvalidArgumentException extends CoreInvalidArgumentException implements Exception
|
||||
{
|
||||
/** @phpstan-pure */
|
||||
public static function divisionByZero(): DivisionByZeroException
|
||||
{
|
||||
return new DivisionByZeroException('Cannot compute division with a zero divisor');
|
||||
}
|
||||
|
||||
/** @phpstan-pure */
|
||||
public static function moduloByZero(): ModuloByZeroException
|
||||
{
|
||||
return new ModuloByZeroException('Cannot compute modulo with a zero divisor');
|
||||
}
|
||||
|
||||
/** @phpstan-pure */
|
||||
public static function currencyMismatch(): CurrencyMismatchException
|
||||
{
|
||||
return new CurrencyMismatchException('Currencies must be identical');
|
||||
}
|
||||
}
|
||||
9
vendor/moneyphp/money/src/Exception/ModuloByZeroException.php
vendored
Normal file
9
vendor/moneyphp/money/src/Exception/ModuloByZeroException.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Money\Exception;
|
||||
|
||||
final class ModuloByZeroException extends InvalidArgumentException
|
||||
{
|
||||
}
|
||||
15
vendor/moneyphp/money/src/Exception/ParserException.php
vendored
Normal file
15
vendor/moneyphp/money/src/Exception/ParserException.php
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Money\Exception;
|
||||
|
||||
use Money\Exception;
|
||||
use RuntimeException;
|
||||
|
||||
/**
|
||||
* Thrown when a string cannot be parsed to a Money object.
|
||||
*/
|
||||
final class ParserException extends RuntimeException implements Exception
|
||||
{
|
||||
}
|
||||
15
vendor/moneyphp/money/src/Exception/UnknownCurrencyException.php
vendored
Normal file
15
vendor/moneyphp/money/src/Exception/UnknownCurrencyException.php
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Money\Exception;
|
||||
|
||||
use DomainException;
|
||||
use Money\Exception;
|
||||
|
||||
/**
|
||||
* Thrown when trying to get ISO currency that does not exists.
|
||||
*/
|
||||
final class UnknownCurrencyException extends DomainException implements Exception
|
||||
{
|
||||
}
|
||||
31
vendor/moneyphp/money/src/Exception/UnresolvableCurrencyPairException.php
vendored
Normal file
31
vendor/moneyphp/money/src/Exception/UnresolvableCurrencyPairException.php
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Money\Exception;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use Money\Currency;
|
||||
use Money\Exception;
|
||||
|
||||
use function sprintf;
|
||||
|
||||
/**
|
||||
* Thrown when there is no currency pair (rate) available for the given currencies.
|
||||
*/
|
||||
final class UnresolvableCurrencyPairException extends InvalidArgumentException implements Exception
|
||||
{
|
||||
/**
|
||||
* Creates an exception from Currency objects.
|
||||
*/
|
||||
public static function createFromCurrencies(Currency $baseCurrency, Currency $counterCurrency): UnresolvableCurrencyPairException
|
||||
{
|
||||
$message = sprintf(
|
||||
'Cannot resolve a currency pair for currencies: %s/%s',
|
||||
$baseCurrency->getCode(),
|
||||
$counterCurrency->getCode()
|
||||
);
|
||||
|
||||
return new self($message);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user