Total Complexity | 4 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
25 | class IdleSleepStrategy extends AbstractStrategy |
||
26 | { |
||
27 | |||
28 | public $duration = 1; |
||
29 | |||
30 | 1 | public function attach(EventManagerInterface $events, $priority = 1) |
|
36 | ); |
||
37 | 1 | } |
|
38 | |||
39 | /** |
||
40 | * @param mixed $duration |
||
41 | * |
||
42 | * @return self |
||
43 | */ |
||
44 | 1 | public function setDuration($duration) |
|
45 | { |
||
46 | 1 | $this->duration = $duration; |
|
47 | |||
48 | 1 | return $this; |
|
49 | } |
||
50 | |||
51 | |||
52 | 2 | public function onIdle(ProcessIdleEvent $event) |
|
58 | } |
||
59 | 2 | } |
|
61 |