100000) { throw new RuntimeException('Set INVESTMOZ_CARTOGRAPHY_FILE and INVESTMOZ_CARTOGRAPHY_MANIFEST to authorised local files.'); } $manifest = json_decode(file_get_contents($manifestPath), true, 32, JSON_THROW_ON_ERROR); $report = (new CartographyWorkbookAudit)->inspect($workbookPath, $manifest); echo json_encode($report, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR).PHP_EOL; } catch (Throwable $exception) { fwrite(STDERR, 'Audit failed: '.$exception->getMessage().PHP_EOL); exit(1); }