argument('result')); if ($path === false || ! is_file($path) || filesize($path) > 100000) { throw new \RuntimeException('Local result file required.'); } $input = json_decode((string) file_get_contents($path), true, 16, JSON_THROW_ON_ERROR); if (! is_array($input) || ($input['synthetic_only'] ?? null) !== true || ! is_array($input['claims'] ?? null)) { throw new \RuntimeException('Synthetic result required.'); } $result = $assessment->assess($input['claims']); $this->line(json_encode($result, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR)); return self::SUCCESS; } catch (Throwable) { $this->error('Não foi possível conferir o resultado fictício. Verifique o ficheiro e as referências; nenhum pedido externo foi efectuado.'); return self::FAILURE; } } }