First full working version
This commit is contained in:
@ -112,7 +112,7 @@ final class ConcordanceChecker {
|
||||
break;
|
||||
case "MDConcLicenses":
|
||||
$output = [];
|
||||
foreach (MDLicensesSet::AVAILABLE_LICENSES as $l) $output[$l] = $l;
|
||||
foreach (MDLicensesSet::AVAILABLE_LICENSES as $l) $output[] = ['id' => $l, 'name' => $l];
|
||||
return $output;
|
||||
break;
|
||||
case "MDConcLoanTypes":
|
||||
@ -191,8 +191,13 @@ final class ConcordanceChecker {
|
||||
*/
|
||||
public function evaluate(array $toValidate):array {
|
||||
|
||||
$toValidate = array_unique($toValidate);
|
||||
|
||||
$passed = $not_passed = [];
|
||||
foreach ($toValidate as $entry) {
|
||||
|
||||
if (empty(trim($entry))) continue;
|
||||
|
||||
try {
|
||||
$target = $this->class::getConcordanceTarget($entry);
|
||||
$passed[$entry] = $target;
|
||||
|
Reference in New Issue
Block a user