| Total Complexity | 3 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class IrcChannel |
||
| 6 | { |
||
| 7 | /** @var string */ |
||
| 8 | private $name; |
||
| 9 | |||
| 10 | /** @var string[] */ |
||
| 11 | private $users; |
||
| 12 | |||
| 13 | public function __construct(string $name) |
||
| 17 | } |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Fetch the list of users currently on this channel. |
||
| 21 | * |
||
| 22 | * @return string[] |
||
| 23 | */ |
||
| 24 | public function getUsers(): array |
||
| 25 | { |
||
| 26 | return $this->users; |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Set the list of active users on the channel. |
||
| 31 | * |
||
| 32 | * @param string[] $users An array of user names. |
||
| 33 | */ |
||
| 34 | public function setUsers(array $users): void |
||
| 37 | } |
||
| 38 | } |
||
| 39 |