Skip to content

Commit

Permalink
Small typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentBean committed Jun 24, 2020
1 parent 87e640a commit a76d14f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Controller/Adminhtml/Test/Sentry.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public function execute()
$result = ['status' => false];

$activeWithReason = $this->helperSentry->isActiveWithReason();

if ($activeWithReason['active']) {
try {
$this->monologPlugin->addAlert('TEST message from Magento 2', []);
Expand All @@ -95,7 +96,7 @@ public function execute()
$this->logger->critical($e);
}
} else {
$result['content'] = implode(PHP_EOL, $activeWithReason['reason']);
$result['content'] = implode(PHP_EOL, $activeWithReason['reasons']);
}

return $this->getResponse()->representJson(
Expand Down
8 changes: 4 additions & 4 deletions Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,19 +143,19 @@ public function isActiveWithReason()
$productionMode = ($this->isProductionMode() || $this->isOverwriteProductionMode());

if ($emptyConfig) {
$reasons[] = __('Config is empty. ');
$reasons[] = __('Config is empty.');
}
if (!$configEnabled) {
$reasons[] = __('Module is not enabled in config. ');
$reasons[] = __('Module is not enabled in config.');
}
if (!$dsnNotEmpty) {
$reasons[] = __('DSN is empty. ');
$reasons[] = __('DSN is empty.');
}
if (!$productionMode) {
$reasons[] = __('Not in production and development mode is false.');
}

return strlen($reason) ? ['active' => 'false', 'reasons' => $reason] : ['active' => true];
return count($reasons) > 0 ? ['active' => false, 'reasons' => $reasons] : ['active' => true];
}

/**
Expand Down

0 comments on commit a76d14f

Please sign in to comment.