Completed
Push — master ( ac9c3e...191d3f )
by Jeroen
01:42
created

IrcChannel::getUsers()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Jerodev\PhpIrcClient;
4
5
class IrcChannel
6
{
7
    /** @var string */
8
    private $name;
9
10
    /** @var string[] */
11
    private $users;
12
13
    public function __construct(string $name)
14
    {
15
        $this->name = $name;
16
        $this->users = [];
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
35
    {
36
        $this->users = $users;
37
    }
38
}
39