Conditions | 4 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | protected static function createLoopAdapter(): ILoopAdapter |
||
32 | { |
||
33 | /** @var class-string<IProbe> $probe */ |
||
34 | foreach (static::getProbeClasses() as $probe) { |
||
35 | if (is_subclass_of($probe, ILoopProbe::class) && $probe::isSupported()) { |
||
36 | return $probe::createLoop(); |
||
37 | } |
||
38 | } |
||
39 | throw new DomainException( |
||
40 | 'No supported event loop found.' . |
||
41 | ' Check you have installed one of the supported event loops.' . |
||
42 | ' Check your probes list if you have modified it.' |
||
43 | ); |
||
52 |