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