| Conditions | 4 |
| Paths | 4 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 49 | public static function getByLastMod(\DateTimeInterface $last_mod): ?string |
||
| 50 | { |
||
| 51 | if ($last_mod < new \DateTime('-1 year')) { |
||
| 52 | return self::YEARLY; |
||
| 53 | } |
||
| 54 | |||
| 55 | if ($last_mod < new \DateTime('-1 month')) { |
||
| 56 | return self::MONTHLY; |
||
| 57 | } |
||
| 58 | |||
| 59 | if ($last_mod < new \DateTime('-1 week')) { |
||
| 60 | return self::WEEKLY; |
||
| 61 | } |
||
| 62 | |||
| 63 | return null; |
||
| 64 | } |
||
| 65 | |||
| 76 |