diff --git a/Classes/Suggestion/SuggestionContext.php b/Classes/Suggestion/SuggestionContext.php index be2fe33..26f11e0 100644 --- a/Classes/Suggestion/SuggestionContext.php +++ b/Classes/Suggestion/SuggestionContext.php @@ -29,7 +29,7 @@ class SuggestionContext implements SuggestionContextInterface */ protected $contextValues = []; - public function buildForIndex(NodeInterface $node): self + public function buildForIndex(NodeInterface $node): SuggestionContextInterface { $this->contextValues = [ 'siteName' => $this->getSiteName($node), @@ -40,7 +40,7 @@ public function buildForIndex(NodeInterface $node): self return $this; } - public function buildForSearch(NodeInterface $node): self + public function buildForSearch(NodeInterface $node): SuggestionContextInterface { $this->contextValues = [ 'siteName' => $this->getSiteName($node), diff --git a/Classes/Suggestion/SuggestionContextInterface.php b/Classes/Suggestion/SuggestionContextInterface.php index 3b39fc0..8c377d4 100644 --- a/Classes/Suggestion/SuggestionContextInterface.php +++ b/Classes/Suggestion/SuggestionContextInterface.php @@ -22,13 +22,13 @@ interface SuggestionContextInterface * Build the context from a given node * @param NodeInterface $node */ - public function buildForIndex(NodeInterface $node): self; + public function buildForIndex(NodeInterface $node): SuggestionContextInterface; /** * Build the context from a given node * @param NodeInterface $node */ - public function buildForSearch(NodeInterface $node): self; + public function buildForSearch(NodeInterface $node): SuggestionContextInterface; /** * Returns the calculated context identifier