Skip to content

Commit

Permalink
determine dataPath for missals
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRDOrazio committed Nov 30, 2024
1 parent abcea24 commit 2b034a4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Health.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use LiturgicalCalendar\Api\Enum\ReturnType;
use LiturgicalCalendar\Api\Enum\Route;
use LiturgicalCalendar\Api\Enum\JsonData;
use LiturgicalCalendar\Api\Enum\RomanMissal;

/**
* This class provides a WebSocket-based interface for executing various tests
Expand Down Expand Up @@ -392,6 +393,10 @@ private function executeValidation(object $validation, ConnectionInterface $to)
);
break;
}
} elseif (preg_match("/^proprium\-de\-sanctis(?:\-([A-Z]{2}))?\-([1-2][0-9]{3})\-i18n$/", $validation->validate, $matches)) {
$region = $matches[1] !== '' ? $matches[1] : 'EDITIO_TYPICA';
$year = $matches[2];
$dataPath = RomanMissal::$i18nPath["{$region}_{$year}"];
}
} else {
if (property_exists($validation, 'sourceFile')) {
Expand Down Expand Up @@ -423,6 +428,10 @@ private function executeValidation(object $validation, ConnectionInterface $to)
);
break;
}
} elseif (preg_match("/^proprium\-de\-sanctis(?:\-([A-Z]{2}))?\-([1-2][0-9]{3})$/", $validation->validate, $matches)) {
$region = $matches[1] !== '' ? $matches[1] : 'EDITIO_TYPICA';
$year = $matches[2];
$dataPath = RomanMissal::$jsonFiles["{$region}_{$year}"];
}
}
}
Expand Down

0 comments on commit 2b034a4

Please sign in to comment.