Conditions | 3 |
Paths | 4 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | public function addChecker($protocol, Checker $checker) |
||
32 | { |
||
33 | if (! array_key_exists($protocol, $this->protocolsToChecker)) { |
||
34 | $this->protocolsToChecker[$protocol] = null; |
||
35 | } |
||
36 | if (! empty($this->protocolsToChecker[$protocol])) { |
||
37 | throw InvalidArgument::checkerAlreadyRegisterd($protocol); |
||
38 | } |
||
39 | $this->protocolsToChecker[$protocol] = $checker; |
||
40 | } |
||
41 | |||
71 |