Skip to content

Commit

Permalink
Fix getSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
HannahDeWachter committed Jun 24, 2024
1 parent 6f88725 commit 212b02f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/controllers/SubscribeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class SubscribeController extends Controller
public function actionIndex(): ?\yii\web\Response
{
/* @var Settings $settings */
$settings = CampaignMonitor::$plugin->getSettingsResponse();
$settings = CampaignMonitor::getInstance()->getSettings();
if (!$settings->checkSettings()) {

Check failure on line 19 in src/controllers/SubscribeController.php

View workflow job for this annotation

GitHub Actions / ci / Code Quality / PHPStan / PHPStan

Call to an undefined method craft\base\Model::checkSettings().
Craft::$app->getSession()->setError(Craft::t('site', "Please provide an API key and Client ID"));
return $this->asFailure(Craft::t('site', "Please provide an API key and Client ID"));
Expand Down
2 changes: 1 addition & 1 deletion src/services/CampaignMonitorService.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class CampaignMonitorService extends Component
public function init(): void
{
parent::init();
$settings = CampaignMonitor::$plugin->getSettingsResponse();
$settings = CampaignMonitor::getInstance()->getSettings();
$this->apiKey = $settings->getApiKey();

Check failure on line 16 in src/services/CampaignMonitorService.php

View workflow job for this annotation

GitHub Actions / ci / Code Quality / PHPStan / PHPStan

Call to an undefined method craft\base\Model::getApiKey().
}

Expand Down

0 comments on commit 212b02f

Please sign in to comment.