()
| 64 | } |
| 65 | |
| 66 | public static function load(): array |
| 67 | { |
| 68 | $path = self::filePath(); |
| 69 | if (self::$cachePath !== $path) { |
| 70 | self::$cache = null; |
| 71 | self::$cacheMtime = 0; |
| 72 | self::$cachePath = $path; |
| 73 | } |
| 74 | $mt = is_file($path) ? (int)@filemtime($path) : 0; |
| 75 | if (self::$cache !== null && self::$cacheMtime === $mt) { |
| 76 | return self::$cache; |
| 77 | } |
| 78 | |
| 79 | self::$cache = self::loadFresh(); |
| 80 | self::$cacheMtime = $mt; |
| 81 | return self::$cache; |
| 82 | } |
| 83 | |
| 84 | private static function write(array $doc): bool |
| 85 | { |
no test coverage detected