Conditions | 5 |
Paths | 5 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 30 |
Changes | 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( |
||
42 | 'You must give a LoopInterface instance with the Client' |
||
43 | ); |
||
44 | } |
||
45 | |||
46 | $this->loop = $loop ?: ReactFactory::buildEventLoop(); |
||
47 | $this->client = $client ?: ReactFactory::buildHttpClient($this->loop); |
||
48 | } |
||
49 | |||
79 |