| Total Complexity | 6 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Coverage | 95.83% |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | final class SignalAware implements ClientInterface |
||
| 9 | { |
||
| 10 | private $client; |
||
| 11 | private $handlersRegistered = false; |
||
| 12 | |||
| 13 | 2 | public function __construct(ClientInterface $client) |
|
| 14 | { |
||
| 15 | 2 | $this->client = $client; |
|
| 16 | 2 | } |
|
| 17 | |||
| 18 | 1 | public function channel(): Channel |
|
| 19 | { |
||
| 20 | 1 | $this->register(); |
|
| 21 | |||
| 22 | 1 | return $this->client->channel(); |
|
| 23 | } |
||
| 24 | |||
| 25 | 1 | public function closed(): bool |
|
| 26 | { |
||
| 27 | 1 | return $this->client->closed(); |
|
| 28 | } |
||
| 29 | |||
| 30 | 1 | public function close(): void |
|
| 33 | 1 | } |
|
| 34 | |||
| 35 | 1 | private function register(): void |
|
| 36 | { |
||
| 58 |