Method
copyLegacyMetadata
(string $legacyPath, string $encodedPath)
Source from the content-addressed store, hash-verified
| 130 | } |
| 131 | |
| 132 | private static function copyLegacyMetadata(string $legacyPath, string $encodedPath): void |
| 133 | { |
| 134 | $raw = @file_get_contents($legacyPath); |
| 135 | if (!is_string($raw)) { |
| 136 | return; |
| 137 | } |
| 138 | $decoded = json_decode($raw, true); |
| 139 | if (!is_array($decoded)) { |
| 140 | return; |
| 141 | } |
| 142 | @file_put_contents($encodedPath, json_encode($decoded, JSON_PRETTY_PRINT), LOCK_EX); |
| 143 | } |
| 144 | |
| 145 | /** |
| 146 | * @return list<string> |
Tested by
no test coverage detected