| Conditions | 5 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 5.2 |
| 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('You must give a LoopInterface instance with the Client'); |
||
| 42 | } |
||
| 43 | |||
| 44 | 104 | $this->loop = $loop ?: ReactFactory::buildEventLoop(); |
|
| 45 | 104 | $this->client = $client ?: ReactFactory::buildHttpClient($this->loop); |
|
| 46 | 104 | } |
|
| 77 |