Skip to content

Commit

Permalink
OptimizeChoose: minor code simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshyPHP committed Dec 17, 2023
1 parent 31ae9ab commit 14d7596
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Configurator/TemplateNormalizations/OptimizeChoose.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,10 @@ protected function optimizeEmptyBranch()
}

// test="@foo" becomes test="not(@foo)"
$when = $this->choose->query('xsl:when')[0];
$when = $this->choose->firstOf('xsl:when');
$when->setAttribute('test', 'not(' . $when->getAttribute('test') . ')');

$otherwise = $this->choose->query('xsl:otherwise')[0];
$otherwise = $this->choose->firstOf('xsl:otherwise');
$when->append(...$otherwise->childNodes);
}

Expand Down

0 comments on commit 14d7596

Please sign in to comment.