fix: complete InvesteMoz validation and error corrections
This commit is contained in:
@@ -2,15 +2,19 @@
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Support\CheckedFile;
|
||||
use DOMDocument;
|
||||
use DOMElement;
|
||||
|
||||
/** Supplement the six named agribusiness sections without changing corridor masters or source documents. */
|
||||
final class CorridorAgribusiness
|
||||
{
|
||||
/**
|
||||
* @param array<array-key, mixed> $links
|
||||
*/
|
||||
public function enrich(string $html, array $links = []): string
|
||||
{
|
||||
$data = json_decode(file_get_contents(__DIR__.'/../../database/data/corridor-investment-opportunities.json'), true, 512, JSON_THROW_ON_ERROR);
|
||||
$data = json_decode(CheckedFile::read(__DIR__.'/../../database/data/corridor-investment-opportunities.json'), true, 512, JSON_THROW_ON_ERROR);
|
||||
$doc = new DOMDocument;
|
||||
$previous = libxml_use_internal_errors(true);
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user