| Total Complexity | 2 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | class OnePerGroup implements Keeper |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * Grouping date format f.e. 'Ymd'. |
||
| 22 | * |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | private $group; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * List of groups containing the files. |
||
| 29 | * |
||
| 30 | * @var \phpbu\App\Backup\File\Local[][] |
||
| 31 | */ |
||
| 32 | private $groups = []; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * OnePerGroup constructor. |
||
| 36 | * |
||
| 37 | * @param string $group |
||
| 38 | */ |
||
| 39 | 4 | public function __construct(string $group) |
|
| 42 | 4 | } |
|
| 43 | |||
| 44 | /** |
||
| 45 | * Decides if given file should be kept. |
||
| 46 | * |
||
| 47 | * @param \phpbu\App\Backup\File $file |
||
| 48 | * @return bool |
||
| 49 | */ |
||
| 50 | 3 | public function keep(File $file) : bool |
|
| 59 |