| Conditions | 5 |
| Paths | 5 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 5.583 |
| Changes | 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 | } |
|
| 49 | |||
| 79 |