This commit is contained in:
Thomas Peterson 2025-02-08 22:35:47 +01:00
parent 2e98224be7
commit b86d8122fc
3 changed files with 19 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@ -145,17 +145,25 @@ class Valid
}
if(count($option->getEdgesCollectionContainer()) > 0) {
$option->setIsValid(false);
}
$mainEdges = true;
/** @var EdgeCollection $collection */
foreach($option->getEdgesCollectionContainer() as $collection) {
/** @var Edge $edge */
$collValid = false;
foreach($collection as $edge) {
if($this->edgeIsValid($collection->getName(), $edge)) {
$option->setIsValid(true);
if(!$collValid && $this->edgeIsValid($collection->getName(), $edge)) {
$collValid = true;
}
}
if(!$collValid) {
$mainEdges = false;
break;
}
}
if(!$mainEdges && $option->isValid()) {
$option->setIsValid(false);
}
$this->engine->setVariables($option->parseAdditionalValues($this->engine->getVariables()));

View File

@ -109,4 +109,9 @@ class Opt
{
$this->isSelected = $isSelected;
}
public function clearEdgesCollectionContainer()
{
$this->edgesCollectionContainer = new EdgeCollectionContainer();
}
}