Website modules per CorePHP pattern: - Website\Lethean: lthn.io homepage (domain: lthn.io) - Website\Explorer: block explorer (domain: explorer.lthn.io) - Website\Names: TLD registrar (domain: names.lthn.io) - Website\Trade: DEX frontend (domain: trade.lthn.io) - Website\Pool: mining pool (domain: pool.lthn.io) Each binds to its subdomain via DomainResolving event and falls back to path prefix (/explorer, /names, etc) on lthn.io. Autoloader updated with Website\ namespace. Co-Authored-By: Charon <charon@lethean.io>
28 lines
597 B
PHP
28 lines
597 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Brick\Math\Exception;
|
|
|
|
use Brick\Math\BigInteger;
|
|
|
|
use function sprintf;
|
|
|
|
use const PHP_INT_MAX;
|
|
use const PHP_INT_MIN;
|
|
|
|
/**
|
|
* Exception thrown when an integer overflow occurs.
|
|
*/
|
|
final class IntegerOverflowException extends MathException
|
|
{
|
|
/**
|
|
* @pure
|
|
*/
|
|
public static function toIntOverflow(BigInteger $value): IntegerOverflowException
|
|
{
|
|
$message = '%s is out of range %d to %d and cannot be represented as an integer.';
|
|
|
|
return new self(sprintf($message, $value->toString(), PHP_INT_MIN, PHP_INT_MAX));
|
|
}
|
|
}
|