| Total Complexity | 2 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | class BadProxyListUriException extends RuntimeException implements AppBundleExceptionInterface |
||
| 26 | { |
||
| 27 | /** |
||
| 28 | * Default error message |
||
| 29 | * |
||
| 30 | * @const string |
||
| 31 | */ |
||
| 32 | public const MESSAGE = 'Cannot locate a proxy list by specified URI.'; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Error message with proxy list URI |
||
| 36 | * |
||
| 37 | * @const string |
||
| 38 | */ |
||
| 39 | public const MESSAGE_WITH_PROXY_LIST_URI = "Cannot locate a proxy list by specified URI '{proxyListUri}'."; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * {@inheritdoc} |
||
| 43 | */ |
||
| 44 | public function __construct(string $message = self::MESSAGE, int $code = 0, Throwable $previous = null) |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * Returns exception in context of specified proxy list URI |
||
| 51 | * |
||
| 52 | * @param string $proxyListUri Proxy list URI |
||
| 53 | * |
||
| 54 | * @return BadProxyListUriException |
||
| 55 | */ |
||
| 56 | public static function withProxyListUri(string $proxyListUri): BadProxyListUriException |
||
| 63 |