Total Complexity | 5 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | abstract class ALoopConfig implements ILoopConfig |
||
13 | { |
||
14 | public function __construct( |
||
15 | protected RunMode $runMode, |
||
16 | protected AutoStart $autoStart, |
||
17 | protected SignalHandlers $signalHandlersOption, |
||
18 | ) { |
||
19 | } |
||
20 | |||
21 | public function isAsynchronous(): bool |
||
22 | { |
||
23 | return $this->runMode === RunMode::ASYNC; |
||
24 | } |
||
25 | |||
26 | public function isAutoStartEnabled(): bool |
||
27 | { |
||
28 | return $this->autoStart === AutoStart::ENABLED; |
||
29 | } |
||
30 | |||
31 | public function areSignalHandlersEnabled(): bool |
||
32 | { |
||
33 | return $this->signalHandlersOption === SignalHandlers::ENABLED; |
||
34 | } |
||
35 | |||
36 | public function getSignalHandlers(): ?iterable |
||
40 | } |
||
41 | } |