mailpoet
/
vendor-prefixed
/
doctrine
/
common
/
src
/
Proxy
/
Exception
/
UnexpectedValueException.php
InvalidArgumentException.php
2 years ago
OutOfBoundsException.php
2 years ago
ProxyException.php
2 years ago
UnexpectedValueException.php
2 years ago
index.php
2 years ago
UnexpectedValueException.php
22 lines
| 1 | <?php |
| 2 | namespace MailPoetVendor\Doctrine\Common\Proxy\Exception; |
| 3 | if (!defined('ABSPATH')) exit; |
| 4 | use Throwable; |
| 5 | use UnexpectedValueException as BaseUnexpectedValueException; |
| 6 | use function sprintf; |
| 7 | class UnexpectedValueException extends BaseUnexpectedValueException implements ProxyException |
| 8 | { |
| 9 | public static function proxyDirectoryNotWritable($proxyDirectory) |
| 10 | { |
| 11 | return new self(sprintf('Your proxy directory "%s" must be writable', $proxyDirectory)); |
| 12 | } |
| 13 | public static function invalidParameterTypeHint($className, $methodName, $parameterName, ?Throwable $previous = null) |
| 14 | { |
| 15 | return new self(sprintf('The type hint of parameter "%s" in method "%s" in class "%s" is invalid.', $parameterName, $methodName, $className), 0, $previous); |
| 16 | } |
| 17 | public static function invalidReturnTypeHint($className, $methodName, ?Throwable $previous = null) |
| 18 | { |
| 19 | return new self(sprintf('The return type of method "%s" in class "%s" is invalid.', $methodName, $className), 0, $previous); |
| 20 | } |
| 21 | } |
| 22 |