| Conditions | 1 |
| Paths | 1 |
| Total Lines | 7 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | 17 | public function addEvent(?int $time = null): void |
|
| 22 | { |
||
| 23 | 17 | $time = $this->getBaseTime($time); |
|
| 24 | // Is there any event during [$time] period? If not initialize with 0 |
||
| 25 | 17 | $this->events[$time] = $this->events[$time] ?? 0; |
|
| 26 | 17 | $this->events[$time]++; |
|
| 27 | 17 | $this->trim(); |
|
| 28 | 17 | } |
|
| 67 |