@@ -3,9 +3,9 @@ |
||
| 3 | 3 | |
| 4 | 4 | class ReadlineException extends \ErrorException implements SafeExceptionInterface |
| 5 | 5 | { |
| 6 | - public static function createFromPhpError(): self |
|
| 7 | - { |
|
| 8 | - $error = error_get_last(); |
|
| 9 | - return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); |
|
| 10 | - } |
|
| 6 | + public static function createFromPhpError(): self |
|
| 7 | + { |
|
| 8 | + $error = error_get_last(); |
|
| 9 | + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); |
|
| 10 | + } |
|
| 11 | 11 | } |
@@ -3,9 +3,9 @@ |
||
| 3 | 3 | |
| 4 | 4 | class OpcacheException extends \ErrorException implements SafeExceptionInterface |
| 5 | 5 | { |
| 6 | - public static function createFromPhpError(): self |
|
| 7 | - { |
|
| 8 | - $error = error_get_last(); |
|
| 9 | - return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); |
|
| 10 | - } |
|
| 6 | + public static function createFromPhpError(): self |
|
| 7 | + { |
|
| 8 | + $error = error_get_last(); |
|
| 9 | + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); |
|
| 10 | + } |
|
| 11 | 11 | } |
@@ -3,9 +3,9 @@ |
||
| 3 | 3 | |
| 4 | 4 | class VarException extends \ErrorException implements SafeExceptionInterface |
| 5 | 5 | { |
| 6 | - public static function createFromPhpError(): self |
|
| 7 | - { |
|
| 8 | - $error = error_get_last(); |
|
| 9 | - return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); |
|
| 10 | - } |
|
| 6 | + public static function createFromPhpError(): self |
|
| 7 | + { |
|
| 8 | + $error = error_get_last(); |
|
| 9 | + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); |
|
| 10 | + } |
|
| 11 | 11 | } |
@@ -3,9 +3,9 @@ |
||
| 3 | 3 | |
| 4 | 4 | class YazException extends \ErrorException implements SafeExceptionInterface |
| 5 | 5 | { |
| 6 | - public static function createFromPhpError(): self |
|
| 7 | - { |
|
| 8 | - $error = error_get_last(); |
|
| 9 | - return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); |
|
| 10 | - } |
|
| 6 | + public static function createFromPhpError(): self |
|
| 7 | + { |
|
| 8 | + $error = error_get_last(); |
|
| 9 | + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); |
|
| 10 | + } |
|
| 11 | 11 | } |
@@ -3,9 +3,9 @@ |
||
| 3 | 3 | |
| 4 | 4 | class Bzip2Exception extends \ErrorException implements SafeExceptionInterface |
| 5 | 5 | { |
| 6 | - public static function createFromPhpError(): self |
|
| 7 | - { |
|
| 8 | - $error = error_get_last(); |
|
| 9 | - return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); |
|
| 10 | - } |
|
| 6 | + public static function createFromPhpError(): self |
|
| 7 | + { |
|
| 8 | + $error = error_get_last(); |
|
| 9 | + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); |
|
| 10 | + } |
|
| 11 | 11 | } |
@@ -3,9 +3,9 @@ |
||
| 3 | 3 | |
| 4 | 4 | class FilesystemException extends \ErrorException implements SafeExceptionInterface |
| 5 | 5 | { |
| 6 | - public static function createFromPhpError(): self |
|
| 7 | - { |
|
| 8 | - $error = error_get_last(); |
|
| 9 | - return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); |
|
| 10 | - } |
|
| 6 | + public static function createFromPhpError(): self |
|
| 7 | + { |
|
| 8 | + $error = error_get_last(); |
|
| 9 | + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); |
|
| 10 | + } |
|
| 11 | 11 | } |
@@ -3,9 +3,9 @@ |
||
| 3 | 3 | |
| 4 | 4 | class ImapException extends \ErrorException implements SafeExceptionInterface |
| 5 | 5 | { |
| 6 | - public static function createFromPhpError(): self |
|
| 7 | - { |
|
| 8 | - $error = error_get_last(); |
|
| 9 | - return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); |
|
| 10 | - } |
|
| 6 | + public static function createFromPhpError(): self |
|
| 7 | + { |
|
| 8 | + $error = error_get_last(); |
|
| 9 | + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); |
|
| 10 | + } |
|
| 11 | 11 | } |
@@ -349,12 +349,12 @@ discard block |
||
| 349 | 349 | */ |
| 350 | 350 | function preg_match_all(string $pattern, string $subject, array &$matches = null, int $flags = PREG_PATTERN_ORDER, int $offset = 0): int |
| 351 | 351 | { |
| 352 | - error_clear_last(); |
|
| 353 | - $result = \preg_match_all($pattern, $subject, $matches, $flags, $offset); |
|
| 354 | - if ($result === false) { |
|
| 355 | - throw PcreException::createFromPhpError(); |
|
| 356 | - } |
|
| 357 | - return $result; |
|
| 352 | + error_clear_last(); |
|
| 353 | + $result = \preg_match_all($pattern, $subject, $matches, $flags, $offset); |
|
| 354 | + if ($result === false) { |
|
| 355 | + throw PcreException::createFromPhpError(); |
|
| 356 | + } |
|
| 357 | + return $result; |
|
| 358 | 358 | } |
| 359 | 359 | |
| 360 | 360 | |
@@ -586,12 +586,12 @@ discard block |
||
| 586 | 586 | */ |
| 587 | 587 | function preg_match(string $pattern, string $subject, array &$matches = null, int $flags = 0, int $offset = 0): int |
| 588 | 588 | { |
| 589 | - error_clear_last(); |
|
| 590 | - $result = \preg_match($pattern, $subject, $matches, $flags, $offset); |
|
| 591 | - if ($result === false) { |
|
| 592 | - throw PcreException::createFromPhpError(); |
|
| 593 | - } |
|
| 594 | - return $result; |
|
| 589 | + error_clear_last(); |
|
| 590 | + $result = \preg_match($pattern, $subject, $matches, $flags, $offset); |
|
| 591 | + if ($result === false) { |
|
| 592 | + throw PcreException::createFromPhpError(); |
|
| 593 | + } |
|
| 594 | + return $result; |
|
| 595 | 595 | } |
| 596 | 596 | |
| 597 | 597 | |
@@ -650,10 +650,10 @@ discard block |
||
| 650 | 650 | */ |
| 651 | 651 | function preg_split(string $pattern, string $subject, ?int $limit = -1, int $flags = 0): array |
| 652 | 652 | { |
| 653 | - error_clear_last(); |
|
| 654 | - $result = \preg_split($pattern, $subject, $limit, $flags); |
|
| 655 | - if ($result === false) { |
|
| 656 | - throw PcreException::createFromPhpError(); |
|
| 657 | - } |
|
| 658 | - return $result; |
|
| 653 | + error_clear_last(); |
|
| 654 | + $result = \preg_split($pattern, $subject, $limit, $flags); |
|
| 655 | + if ($result === false) { |
|
| 656 | + throw PcreException::createFromPhpError(); |
|
| 657 | + } |
|
| 658 | + return $result; |
|
| 659 | 659 | } |
@@ -18,10 +18,10 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | function jdtounix(int $jday): int |
| 20 | 20 | { |
| 21 | - error_clear_last(); |
|
| 22 | - $result = \jdtounix($jday); |
|
| 23 | - if ($result === false) { |
|
| 24 | - throw CalendarException::createFromPhpError(); |
|
| 25 | - } |
|
| 26 | - return $result; |
|
| 21 | + error_clear_last(); |
|
| 22 | + $result = \jdtounix($jday); |
|
| 23 | + if ($result === false) { |
|
| 24 | + throw CalendarException::createFromPhpError(); |
|
| 25 | + } |
|
| 26 | + return $result; |
|
| 27 | 27 | } |