| Total Complexity | 4 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Coverage | 75% |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | final class ConnectionClosed extends RuntimeException |
||
| 9 | { |
||
| 10 | private $cause; |
||
| 11 | |||
| 12 | 2 | public static function byServer(string $message, int $code, Method $cause): self |
|
| 13 | { |
||
| 14 | 2 | $self = new self($message, $code); |
|
| 15 | 2 | $self->cause = $cause; |
|
| 16 | |||
| 17 | 2 | return $self; |
|
| 18 | } |
||
| 19 | |||
| 20 | public function hasCause(): bool |
||
| 23 | } |
||
| 24 | |||
| 25 | 2 | public function cause(): Method |
|
| 28 | } |
||
| 29 | } |
||
| 30 |