Skip to content

Commit

Permalink
fix code quality
Browse files Browse the repository at this point in the history
  • Loading branch information
Sander Jongsma committed Jan 22, 2025
1 parent de952fb commit f636f3f
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
use Magento\Framework\App\Helper\Context;
use Magento\Framework\App\ProductMetadataInterface;
use Magento\Framework\App\State;
use Magento\Framework\DB\Adapter\TableNotFoundException;
use Magento\Framework\Exception\FileSystemException;
use Magento\Framework\Exception\RuntimeException;
use Magento\Framework\Serialize\Serializer\Json;
use Magento\Store\Model\ScopeInterface;
Expand Down Expand Up @@ -211,18 +209,18 @@ public function collectModuleConfig(): array
return $this->config[$storeId];
}

if (! $this->scopeConfig->isSetFlag('sentry/environment/enabled', ScopeInterface::SCOPE_STORE)) {
if (!$this->scopeConfig->isSetFlag('sentry/environment/enabled', ScopeInterface::SCOPE_STORE)) {
$this->config[$storeId]['enabled'] = $this->deploymentConfig->get('sentry') !== null;
} else {
$this->config[$storeId]['enabled'] = true;
}

foreach ($this->configKeys as $value) {
if (! $this->scopeConfig->isSetFlag('sentry/environment/enabled', ScopeInterface::SCOPE_STORE)) {
$this->config[$storeId][$value] = $this->deploymentConfig->get('sentry/' . $value);
if (!$this->scopeConfig->isSetFlag('sentry/environment/enabled', ScopeInterface::SCOPE_STORE)) {
$this->config[$storeId][$value] = $this->deploymentConfig->get('sentry/'.$value);
} else {
$this->config[$storeId][$value] = $this->scopeConfig->getValue('sentry/environment/' . $value, ScopeInterface::SCOPE_STORE)
?? $this->deploymentConfig->get('sentry/' . $value);
$this->config[$storeId][$value] = $this->scopeConfig->getValue('sentry/environment/'.$value, ScopeInterface::SCOPE_STORE)
?? $this->deploymentConfig->get('sentry/'.$value);
}
}

Expand Down

0 comments on commit f636f3f

Please sign in to comment.