Skip to content

Commit

Permalink
Merge pull request #2771 from coreshop/coding-standard/refactor-4.0
Browse files Browse the repository at this point in the history
[CS] Refactor
  • Loading branch information
dpfaffenbauer authored Dec 23, 2024
2 parents aa2436f + 4b228b1 commit f045d50
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,10 @@ public function findStore(Request $request): ?StoreInterface
if ($id) {
$document = Document::getById((int) $id);
}
}
else if ($this->requestHelper->isFrontendRequestByAdmin($request)) {
} elseif ($this->requestHelper->isFrontendRequestByAdmin($request)) {
/** @psalm-suppress InternalMethod */
$document = $this->documentService->getNearestDocumentByPath($request->getPathInfo());
}
else {
} else {
throw new StoreNotFoundException();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
use CoreShop\Component\Store\Context\SiteBasedResolverInterface;
use CoreShop\Component\Store\Context\StoreNotFoundException;
use CoreShop\Component\Store\Model\StoreInterface;
use CoreShop\Component\Store\Repository\StoreRepositoryInterface;
use Pimcore\Model\Document;
use Pimcore\Model\Site;
use Pimcore\Tool\Frontend;
use Symfony\Component\HttpFoundation\Request;

Expand Down
2 changes: 1 addition & 1 deletion src/CoreShop/Component/Store/Context/SiteBasedResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ public function resolveSiteWithDefaultForStore(?Site $site): ?StoreInterface

return null;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
interface SiteBasedResolverInterface
{
public function resolveSiteWithDefaultForStore(?Site $site): ?StoreInterface;
}
}

0 comments on commit f045d50

Please sign in to comment.