Skip to content

Commit

Permalink
Improve code to handle errors, DEV-362
Browse files Browse the repository at this point in the history
  • Loading branch information
RanaMuhammadIrshad committed Feb 1, 2024
1 parent ffb5c24 commit 4db4223
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Helper/StoreUrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@

use Magento\Store\Api\Data\StoreInterface;
use Magento\Store\Model\Store;
use MageWorx\SeoBase\Helper\StoreUrl as MageworxStoreUrl; /** @phpstan-ignore-line */
use MageWorx\SeoBase\Helper\StoreUrl as MageworxStoreUrl;

/** @phpstan-ignore-next-line */
class StoreUrl extends MageworxStoreUrl /** @phpstan-ignore-line */
class StoreUrl extends MageworxStoreUrl
{
protected function isUseStoreCodeInUrl(StoreInterface $store): bool
{
/** @phpstan-ignore-next-line */
if ($store->getCode() !== Store::ADMIN_CODE && $store->isDefault()) {
return false;
}

$storeId = (int)$store->getId();

/** @phpstan-ignore-next-line */
return !($store->hasDisableStoreInUrl() && $store->getDisableStoreInUrl())
&& $this->configDataLoader->getConfigValue(Store::XML_PATH_STORE_IN_URL, $storeId);
}
Expand Down

0 comments on commit 4db4223

Please sign in to comment.