Conditions | 4 |
Paths | 3 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 4.5923 |
Changes | 0 |
1 | <?php |
||
24 | 3 | public function addServer($host, $port, $weight = 0) |
|
25 | { |
||
26 | 3 | $serverList = $this->getServerList(); |
|
27 | 3 | foreach ($serverList as $server) { |
|
28 | if ($server['host'] === $host && $server['port'] === $port) { |
||
29 | return false; |
||
30 | } |
||
31 | } |
||
32 | |||
33 | 3 | return parent::addServer($host, $port, $weight); |
|
34 | } |
||
35 | } |
||
36 |