Total Complexity | 6 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | class RotativeProcessor extends AbstractProcessor |
||
6 | { |
||
7 | private int $maxFiles = 366; |
||
8 | |||
9 | /** |
||
10 | * Log files are rotated count times before being removed. |
||
11 | */ |
||
12 | public function files(int $count): self |
||
13 | { |
||
14 | $this->maxFiles = $count; |
||
15 | |||
16 | return $this; |
||
17 | } |
||
18 | |||
19 | public function handler(string $filename): ?string |
||
28 | } |
||
29 | |||
30 | private function rotate(int $number = 1): string |
||
51 |