| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | protected function initializeChannelArgument(InputInterface $input): void |
||
| 38 | { |
||
| 39 | $channel = $input->getArgument('channel'); |
||
| 40 | |||
| 41 | if (!\is_string($channel)) { |
||
| 42 | throw new InvalidArgumentException('Argument "channel" is not a string.'); |
||
| 43 | } |
||
| 44 | |||
| 45 | try { |
||
| 46 | $this->centrifugoChecker->assertValidChannelName($channel); |
||
| 47 | $this->channel = $channel; |
||
| 48 | } catch (\Exception $e) { |
||
| 49 | throw new InvalidArgumentException($e->getMessage()); |
||
| 50 | } |
||
| 51 | } |
||
| 52 | } |
||
| 53 |