Skip to content

Commit 7c48294

Browse files
Merge pull request #73 from kdambekalns/bugfix/self-return-type-php73
BUGFIX: Avoid fatal error on PHP 7.3
2 parents 626dc6a + ff83077 commit 7c48294

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Classes/Suggestion/SuggestionContext.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class SuggestionContext implements SuggestionContextInterface
2929
*/
3030
protected $contextValues = [];
3131

32-
public function buildForIndex(NodeInterface $node): self
32+
public function buildForIndex(NodeInterface $node): SuggestionContextInterface
3333
{
3434
$this->contextValues = [
3535
'siteName' => $this->getSiteName($node),
@@ -40,7 +40,7 @@ public function buildForIndex(NodeInterface $node): self
4040
return $this;
4141
}
4242

43-
public function buildForSearch(NodeInterface $node): self
43+
public function buildForSearch(NodeInterface $node): SuggestionContextInterface
4444
{
4545
$this->contextValues = [
4646
'siteName' => $this->getSiteName($node),

Classes/Suggestion/SuggestionContextInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ interface SuggestionContextInterface
2222
* Build the context from a given node
2323
* @param NodeInterface $node
2424
*/
25-
public function buildForIndex(NodeInterface $node): self;
25+
public function buildForIndex(NodeInterface $node): SuggestionContextInterface;
2626

2727
/**
2828
* Build the context from a given node
2929
* @param NodeInterface $node
3030
*/
31-
public function buildForSearch(NodeInterface $node): self;
31+
public function buildForSearch(NodeInterface $node): SuggestionContextInterface;
3232

3333
/**
3434
* Returns the calculated context identifier

0 commit comments

Comments
 (0)