settings = $settings; parent::__construct($cronWorkerScheduler); } public function checkProcessingRequirements() { return Bridge::isPremiumKeySpecified(); } public function checkKey() { // for phpstan because we set bridge property in the init function if (!$this->bridge) { throw new InvalidStateException('The class was not initialized properly. Please call the Init method before.'); }; $premiumKey = $this->settings->get(Bridge::PREMIUM_KEY_SETTING_NAME); $result = $this->bridge->checkPremiumKey($premiumKey); $this->bridge->storePremiumKeyAndState($premiumKey, $result); return $result; } }