Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
31 | public static function createForSingleMonitor(array $monitorConfig) |
||
32 | { |
||
33 | return collect($monitorConfig['filesystems'])->map(function ($filesystemName) use ($monitorConfig) { |
||
34 | |||
35 | $backupDestination = BackupDestination::create($filesystemName, $monitorConfig['name']); |
||
36 | |||
37 | return (new BackupDestinationStatus($backupDestination, $filesystemName)) |
||
38 | ->setMaximumAgeOfNewestBackupInDays($monitorConfig['newestBackupsShouldNotBeOlderThanDays']) |
||
39 | ->setMaximumStorageUsageInMegabytes($monitorConfig['storageUsedMayNotBeHigherThanMegabytes']); |
||
40 | }); |
||
41 | } |
||
42 | } |
||
43 |