OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
firebase
/
vendor
/
brick
/
math
/
src
/
Exception
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/12/2024 10:33:39 AM
rwxr-xr-x
📄
DivisionByZeroException.php
771 bytes
08/12/2024 10:33:38 AM
rw-r--r--
📄
IntegerOverflowException.php
549 bytes
08/12/2024 10:33:38 AM
rw-r--r--
📄
MathException.php
168 bytes
08/12/2024 10:33:38 AM
rw-r--r--
📄
NegativeNumberException.php
260 bytes
08/12/2024 10:33:38 AM
rw-r--r--
📄
NumberFormatException.php
1010 bytes
08/12/2024 10:33:39 AM
rw-r--r--
📄
RoundingNecessaryException.php
478 bytes
08/12/2024 10:33:39 AM
rw-r--r--
Editing: NumberFormatException.php
Close
<?php declare(strict_types=1); namespace Brick\Math\Exception; /** * Exception thrown when attempting to create a number from a string with an invalid format. */ class NumberFormatException extends MathException { public static function invalidFormat(string $value) : self { return new self(\sprintf( 'The given value "%s" does not represent a valid number.', $value, )); } /** * @param string $char The failing character. * * @psalm-pure */ public static function charNotInAlphabet(string $char) : self { $ord = \ord($char); if ($ord < 32 || $ord > 126) { $char = \strtoupper(\dechex($ord)); if ($ord < 10) { $char = '0' . $char; } } else { $char = '"' . $char . '"'; } return new self(\sprintf('Char %s is not a valid character in the given alphabet.', $char)); } }