`RequirementsRenderer`: Cast `$currentSet` to `RequirementSet` in `beginChildren()` using inline @var

This commit is contained in:
raviks789 2023-08-14 12:46:47 +02:00
parent 7677a0bc4e
commit 9e0c8ef76a
1 changed files with 1 additions and 0 deletions

View File

@ -20,6 +20,7 @@ class RequirementsRenderer extends RecursiveIteratorIterator
public function beginChildren(): void
{
$this->tags[] = '<li>';
/** @var RequirementSet $currentSet */
$currentSet = $this->getSubIterator();
$state = $currentSet->getState() ? 'fulfilled' : ($currentSet->isOptional() ? 'not-available' : 'missing');
$this->tags[] = '<ul class="set-state ' . $state . '">';