Skip to content

Commit

Permalink
Merge pull request #73 from kdambekalns/bugfix/self-return-type-php73
Browse files Browse the repository at this point in the history
BUGFIX:  Avoid fatal error on PHP 7.3
  • Loading branch information
daniellienert authored Dec 15, 2021
2 parents 626dc6a + ff83077 commit 7c48294
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Classes/Suggestion/SuggestionContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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),
Expand Down
4 changes: 2 additions & 2 deletions Classes/Suggestion/SuggestionContextInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7c48294

Please sign in to comment.