Conditions | 5 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 30 |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
36 | public function __construct( |
||
37 | LoopInterface $loop = null, |
||
38 | ReactBrowser $client = null |
||
39 | ) { |
||
40 | if (null !== $client && null === $loop) { |
||
41 | throw new \RuntimeException('You must give a LoopInterface instance with the Client'); |
||
42 | } |
||
43 | |||
44 | $this->loop = $loop ?: ReactFactory::buildEventLoop(); |
||
45 | $this->client = $client ?: ReactFactory::buildHttpClient($this->loop); |
||
46 | } |
||
77 |