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