fix: complete InvesteMoz validation and error corrections

This commit is contained in:
2026-10-29 21:47:33 +02:00
parent 63147312e2
commit daf8623441
718 changed files with 127308 additions and 20959 deletions
+6 -2
View File
@@ -36,7 +36,11 @@ final class RetainedGeoJsonCollection
$position = 0;
$peek = static function () use ($stream, &$buffer, &$position): ?string {
if ($position === strlen($buffer)) {
$buffer = fread($stream, 65536);
$chunk = fread($stream, 65536);
if ($chunk === false) {
throw new \RuntimeException('Não foi possível ler o exemplar GeoJSON; original preservado.');
}
$buffer = $chunk;
$position = 0;
}
@@ -153,7 +157,7 @@ final class RetainedGeoJsonCollection
}
$expect('}');
$white();
abort_unless($peek() === null && $hadFeatures,422,'Exemplar incompleto ou com conteúdo adicional.');
abort_unless($peek() === null && $hadFeatures, 422, 'Exemplar incompleto ou com conteúdo adicional.');
return $metadata;
} finally {