/** * Check if DB data is up to date * * @param string $moduleName * @param string|bool $version * @return bool * @throws \UnexpectedValueException */ private function isModuleVersionEqual($moduleName, $version) { $module = $this->_moduleList->getModule($moduleName); if (empty($module['schema_version'])) { throw new \UnexpectedValueException("Schema version for module '{$moduleName}' is not specified"); } $configVer = $module['schema_version']; return $version !== false && version_compare($configVer, $version) === SetupInterface::VERSION_COMPARE_EQUAL; }
/** * Check whether module that item depends on is active * * @return bool */ protected function _isModuleDependenciesAvailable() { if ($this->_dependsOnModule) { $module = $this->_dependsOnModule; return !!$this->_moduleList->getModule($module); } return true; }
/** * Whether centinel service is enabled * * @return bool * @SuppressWarnings(PHPMD.BooleanGetMethodName) */ public function getIsCentinelValidationEnabled() { return null !== $this->_moduleList->getModule('Magento_Centinel') && 1 == $this->getConfigData('centinel'); }