| Total Complexity | 7 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | final class Fluent implements ClientInterface |
||
| 9 | { |
||
| 10 | private $client; |
||
| 11 | private $closed = false; |
||
| 12 | |||
| 13 | 4 | public function __construct(ClientInterface $client) |
|
| 14 | { |
||
| 15 | 4 | $this->client = $client; |
|
| 16 | 4 | } |
|
| 17 | |||
| 18 | 2 | public function channel(): Channel |
|
| 19 | { |
||
| 20 | 2 | if ($this->closed()) { |
|
| 21 | 2 | return new Channel\NullChannel; |
|
| 22 | } |
||
| 23 | |||
| 24 | 2 | return new Channel\Fluent($this->client->channel()); |
|
| 25 | } |
||
| 26 | |||
| 27 | 2 | public function closed(): bool |
|
| 30 | } |
||
| 31 | |||
| 32 | 2 | public function close(): void |
|
| 40 | 2 | } |
|
| 41 | } |
||
| 42 |