Skip to content

Commit

Permalink
Fix return type of ViewHelpers
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesbochmann committed Dec 1, 2023
1 parent 4ce823e commit 208b726
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Classes/ViewHelpers/IndexTraversingViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use HDNET\Calendarize\Domain\Model\Index;
use HDNET\Calendarize\Domain\Repository\IndexRepository;
use TYPO3\CMS\Extbase\Persistence\QueryInterface;
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;

/**
* Index traversing.
Expand Down Expand Up @@ -47,7 +48,7 @@ public function initializeArguments(): void
/**
* Render method.
*/
public function render(): array
public function render(): array|QueryResultInterface
{
return $this->indexRepository->findByTraversing(
$this->arguments['index'],
Expand Down
3 changes: 2 additions & 1 deletion Classes/ViewHelpers/IndicesByObjectViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use HDNET\Calendarize\Register;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
use TYPO3\CMS\Extbase\Persistence\QueryInterface;
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;

/**
* Indices by object.
Expand Down Expand Up @@ -51,7 +52,7 @@ public function initializeArguments(): void
/**
* Render method.
*/
public function render(): array
public function render(): array|QueryResultInterface
{
/** @var AbstractEntity $object */
$object = $this->arguments['object'];
Expand Down

0 comments on commit 208b726

Please sign in to comment.