Skip to content

Commit

Permalink
Add guard for type
Browse files Browse the repository at this point in the history
  • Loading branch information
m1k3lm committed Oct 8, 2024
1 parent 9e0727f commit 74516c9
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ protected function getOrderStatusMappingsEntity(): ?OrderStatusSettings
{
$queryFilter = new QueryFilter();
$queryFilter->where('storeId', Operators::EQUALS, $this->storeContext->getStoreId());
$ret = $this->repository->selectOne($queryFilter);
if ($ret instanceof OrderStatusSettings) {
return $ret;
}

/**
* @noinspection PhpIncompatibleReturnTypeInspection
*/
// @phpstan-ignore-next-line
return $this->repository->selectOne($queryFilter);
return null;
}
}

0 comments on commit 74516c9

Please sign in to comment.