diff --git a/Classes/MenuService/ServiceInterface.php b/Classes/MenuService/ServiceInterface.php index bb3c892..e869a3a 100644 --- a/Classes/MenuService/ServiceInterface.php +++ b/Classes/MenuService/ServiceInterface.php @@ -20,7 +20,7 @@ interface ServiceInterface /** * @param string|null $forPath * - * @return array|\Iterator + * @return \Iterator */ public function getItems(string $forPath = null): \Iterator; } diff --git a/Classes/MenuService/SettingsService.php b/Classes/MenuService/SettingsService.php index 99ca0b4..daaf905 100644 --- a/Classes/MenuService/SettingsService.php +++ b/Classes/MenuService/SettingsService.php @@ -15,8 +15,6 @@ namespace DigiComp\Menu\MenuService; use Neos\Flow\Annotations as Flow; /** - * @package DigiComp\Menu\Menu - * * @Flow\Scope("singleton") */ class SettingsService implements ServiceInterface @@ -40,9 +38,9 @@ class SettingsService implements ServiceInterface $items = &$this->menuConfiguration; } if ($items) { - uasort( + \uasort( $items, - function ($a, $b) { + static function ($a, $b) { return $a['sorting'] > $b['sorting']; } ); diff --git a/Classes/ViewHelpers/ProgressViewHelper.php b/Classes/ViewHelpers/ProgressViewHelper.php index 33a7e01..20ac46b 100644 --- a/Classes/ViewHelpers/ProgressViewHelper.php +++ b/Classes/ViewHelpers/ProgressViewHelper.php @@ -53,13 +53,13 @@ class ProgressViewHelper extends AbstractViewHelper { $links = $activeStep = $returnable = $stepsAs = $backLinkAs = $activeStepAs = $linksAs = $activeStepLinkAs = $offset = $linkCount = null; - extract($this->arguments); + \extract($this->arguments, \EXTR_OVERWRITE); //handling famous off by one $activeStep -= $offset; //make sure our array index is numeric - $links = array_values($links); + $links = \array_values($links); if (!$linkCount) { - $linkCount = count($links); + $linkCount = \count($links); } foreach ($links as $i => &$link) { $link['completed'] = $activeStep > $i;