Skip to content

Commit

Permalink
Merge pull request #92 from elgentos/hotfix-return-type-webhook-contr…
Browse files Browse the repository at this point in the history
…ollers

optional return type for webhook controllers
  • Loading branch information
Sander Jongsma authored Jan 17, 2023
2 parents fa306ab + 4119a9c commit 3163f92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Controller/Webhook/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ public function __construct(
$this->typeList = $typeList;
}

public function execute(): ResultInterface
public function execute(): ?ResultInterface
{
if (!$this->protectRoute()) {
return;
return null;
}

$result = $this->resultFactory->create(ResultFactory::TYPE_JSON);
Expand Down
4 changes: 2 additions & 2 deletions Controller/Webhook/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ public function __construct(
$this->urlRewriteResource = $urlRewriteResource;
}

public function execute(): ResultInterface
public function execute(): ?ResultInterface
{
if (!$this->protectRoute()) {
return;
return null;
}

$result = $this->resultFactory->create(ResultFactory::TYPE_JSON);
Expand Down

0 comments on commit 3163f92

Please sign in to comment.