| Total Complexity | 4 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class EventIndicator |
||
| 11 | { |
||
| 12 | public const THRESHOLD = 60; |
||
| 13 | |||
| 14 | /** @var int */ |
||
| 15 | private $lastEventTimestamp; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * EventIndicator constructor. |
||
| 19 | */ |
||
| 20 | public function __construct() |
||
| 21 | { |
||
| 22 | $this->event(); |
||
| 23 | } |
||
| 24 | |||
| 25 | public function event(): void |
||
| 26 | { |
||
| 27 | $this->lastEventTimestamp = $this->current(); |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @return int |
||
| 32 | */ |
||
| 33 | private function current(): int |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @return bool |
||
| 40 | */ |
||
| 41 | public function isOk(): bool |
||
| 45 | } |
||
| 46 | } |