Skip to content

Commit 0ecf954

Browse files
authored
Merge pull request #672 from BenMorel/parse_exception_types
Add types to NumberParseException
2 parents 6e28b3d + 3103823 commit 0ecf954

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/NumberParseException.php

+10
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,16 @@ class NumberParseException extends \Exception
3535
*/
3636
public const TOO_LONG = 4;
3737

38+
/**
39+
* @var int
40+
*/
3841
protected $errorType;
3942

43+
/**
44+
* @param int $errorType
45+
* @param string $message
46+
* @param \Throwable|null $previous
47+
*/
4048
public function __construct($errorType, $message, $previous = null)
4149
{
4250
parent::__construct($message, $errorType, $previous);
@@ -46,6 +54,8 @@ public function __construct($errorType, $message, $previous = null)
4654

4755
/**
4856
* Returns the error type of the exception that has been thrown.
57+
*
58+
* @return int
4959
*/
5060
public function getErrorType()
5161
{

0 commit comments

Comments
 (0)