| Total Complexity | 10 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | final class LoopSetup implements ILoopSetup |
||
| 15 | { |
||
| 16 | public function __construct( |
||
| 20 | } |
||
| 21 | |||
| 22 | public function setup(IDriver $driver): void |
||
| 23 | { |
||
| 24 | if ($this->settings->isLoopAvailable()) { |
||
| 25 | if ($this->settings->isAutoStartEnabled()) { |
||
| 26 | $this->registerAutoStart(); |
||
| 27 | } |
||
| 28 | if ($this->settings->isSignalProcessingAvailable() && $this->settings->isAttachHandlersEnabled()) { |
||
| 29 | $this->registerSignalHandlers($driver); |
||
| 30 | } |
||
| 31 | } |
||
| 32 | } |
||
| 33 | |||
| 34 | private function registerAutoStart(): void |
||
| 35 | { |
||
| 36 | $this->loop->autoStart(); |
||
| 37 | } |
||
| 38 | |||
| 39 | private function registerSignalHandlers(IDriver $driver): void |
||
| 43 | } |
||
| 44 | } |
||
| 45 | |||
| 46 | private function signalHandlers(IDriver $driver): Traversable |
||
| 53 | }, |
||
| 54 | // @codeCoverageIgnoreEnd |
||
| 58 |