Skip to content

Commit

Permalink
TASK: Make use of NodeAggregateIds::toStringArray
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsdesign committed Sep 24, 2024
1 parent 7331e40 commit a418d36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Neos.Neos/Classes/Fusion/MenuItemsImplementation.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,11 @@ protected function findMenuStartingPointAggregateId(): ?NodeAggregateId
return $traversalStartingPoint->aggregateId;
} elseif ($this->getEntryLevel() < 0) {
$ancestorNodeAggregateIds = $this->getCurrentNodeRootlineAggregateIds();
$ancestorNodeAggregateIdArray = array_values(iterator_to_array($ancestorNodeAggregateIds));
$ancestorNodeAggregateIdArray = $ancestorNodeAggregateIds->toStringArray();
return $ancestorNodeAggregateIdArray[$this->getEntryLevel() * -1] ?? null;

Check failure on line 280 in Neos.Neos/Classes/Fusion/MenuItemsImplementation.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 Test linting-unit-functionaltests-mysql (deps: highest)

Method Neos\Neos\Fusion\MenuItemsImplementation::findMenuStartingPointAggregateId() should return Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId|null but returns string|null.

Check failure on line 280 in Neos.Neos/Classes/Fusion/MenuItemsImplementation.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 Test linting-unit-functionaltests-mysql (deps: highest)

Method Neos\Neos\Fusion\MenuItemsImplementation::findMenuStartingPointAggregateId() should return Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId|null but returns string|null.
} else {
$ancestorNodeAggregateIds = $this->getCurrentNodeRootlineAggregateIds();
$ancestorNodeAggregateIdArray = array_reverse(array_values(iterator_to_array($ancestorNodeAggregateIds)));
$ancestorNodeAggregateIdArray = array_reverse($ancestorNodeAggregateIds->toStringArray());
return $ancestorNodeAggregateIdArray[$this->getEntryLevel() - 1] ?? null;

Check failure on line 284 in Neos.Neos/Classes/Fusion/MenuItemsImplementation.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 Test linting-unit-functionaltests-mysql (deps: highest)

Method Neos\Neos\Fusion\MenuItemsImplementation::findMenuStartingPointAggregateId() should return Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId|null but returns string|null.

Check failure on line 284 in Neos.Neos/Classes/Fusion/MenuItemsImplementation.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 Test linting-unit-functionaltests-mysql (deps: highest)

Method Neos\Neos\Fusion\MenuItemsImplementation::findMenuStartingPointAggregateId() should return Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId|null but returns string|null.
}
}
Expand Down

0 comments on commit a418d36

Please sign in to comment.