Total Complexity | 4 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class ServerRepository |
||
8 | { |
||
9 | /** @var Server[] $servers */ |
||
10 | private $servers = []; |
||
11 | |||
12 | public function __toString() : string |
||
13 | { |
||
14 | return implode(', ', $this->servers); |
||
15 | } |
||
16 | |||
17 | public function add(Server $server) : void |
||
20 | } |
||
21 | |||
22 | public function findAll() : array |
||
23 | { |
||
24 | return $this->servers; |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * @return Server[] |
||
29 | */ |
||
30 | public function findByRoles(array $roles) : array |
||
34 | }); |
||
35 | } |
||
36 | } |
||
37 |