| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | 2 | public static function fromNotFoundShortCode(string $shortCode): self |
|
| 21 | { |
||
| 22 | 2 | $e = new self(sprintf('No URL found for short code "%s"', $shortCode)); |
|
| 23 | 2 | $e->detail = $e->getMessage(); |
|
| 24 | 2 | $e->title = self::TITLE; |
|
| 25 | 2 | $e->type = self::TYPE; |
|
| 26 | 2 | $e->status = StatusCodeInterface::STATUS_NOT_FOUND; |
|
| 27 | 2 | $e->additional = [ |
|
| 28 | 2 | 'error' => $e->type, |
|
| 29 | 2 | 'message' => $e->detail, |
|
| 30 | ]; |
||
| 31 | |||
| 32 | 2 | return $e; |
|
| 33 | } |
||
| 35 |