diff --git a/boot.php b/boot.php index ffc87f27..17929ffc 100644 --- a/boot.php +++ b/boot.php @@ -32,6 +32,6 @@ rex_ycom::addTable(rex::getTablePrefix() . 'ycom_user'); rex_yform_manager_dataset::setModelClass(rex::getTablePrefix() . 'ycom_user', rex_ycom_user::class); -if (rex::isBackend() && ('index.php?page=content/edit' == rex_url::currentBackendPage() || 'mediapool' == rex_be_controller::getCurrentPagePart(1))) { +if (rex::isBackend() && ('index.php?page=content/edit' === rex_url::currentBackendPage() || 'mediapool' === rex_be_controller::getCurrentPagePart(1))) { rex_view::addJsFile($this->getAssetsUrl('ycom_backend.js')); } diff --git a/install.php b/install.php index 9b88bc0b..1e283926 100644 --- a/install.php +++ b/install.php @@ -8,7 +8,7 @@ rex_yform_manager_table::deleteCache(); $content = rex_file::get(rex_path::addon('ycom', 'install/tablesets/yform_user.json')); -if (is_string($content) && '' != $content) { +if (is_string($content) && '' !== $content) { rex_yform_manager_table_api::importTablesets($content); } diff --git a/lib/ycom_log.php b/lib/ycom_log.php index d50b8178..b72a0277 100644 --- a/lib/ycom_log.php +++ b/lib/ycom_log.php @@ -2,21 +2,21 @@ class rex_ycom_log { - public const TYPE_ACCESS = 'access'; - public const TYPE_LOGOUT = 'logout'; - public const TYPE_CLICK = 'click'; - public const TYPE_LOGIN_FAILED = 'login_failed'; - public const TYPE_LOGIN_NOT_FOUND = 'login_not_found'; - public const TYPE_LOGIN_SUCCESS = 'login_success'; - public const TYPE_LOGIN_UPDATED = 'login_updated'; - public const TYPE_LOGIN_DELETED = 'login_deleted'; - public const TYPE_REGISTERD = 'registerd'; - public const TYPE_SESSION_FAILED = 'session_failed'; - public const TYPE_COOKIE_FAILED = 'cookie_failed'; - public const TYPE_IMPERSONATE = 'session_impersonate'; + public const TYPE_ACCESS = 'access'; /** @api */ + public const TYPE_LOGOUT = 'logout'; /** @api */ + public const TYPE_CLICK = 'click'; /** @api */ + public const TYPE_LOGIN_FAILED = 'login_failed'; /** @api */ + public const TYPE_LOGIN_NOT_FOUND = 'login_not_found'; /** @api */ + public const TYPE_LOGIN_SUCCESS = 'login_success'; /** @api */ + public const TYPE_LOGIN_UPDATED = 'login_updated'; /** @api */ + public const TYPE_LOGIN_DELETED = 'login_deleted'; /** @api */ + public const TYPE_REGISTERD = 'registerd'; /** @api */ + public const TYPE_SESSION_FAILED = 'session_failed'; /** @api */ + public const TYPE_COOKIE_FAILED = 'cookie_failed'; /** @api */ + public const TYPE_IMPERSONATE = 'session_impersonate'; /** @api */ public const TYPES = [self::TYPE_COOKIE_FAILED, self::TYPE_SESSION_FAILED, self::TYPE_ACCESS, self::TYPE_LOGIN_SUCCESS, self::TYPE_LOGOUT, self::TYPE_LOGIN_UPDATED, self::TYPE_CLICK, self::TYPE_LOGIN_FAILED, self::TYPE_REGISTERD, self::TYPE_LOGIN_DELETED, self::TYPE_LOGIN_NOT_FOUND]; - /** @var null|bool */ + /** @var bool|null */ private static $active; private static int $maxFileSize = 20000000; // 20 Mb Default diff --git a/lib/ycom_user.php b/lib/ycom_user.php index 4528d057..5bde3683 100644 --- a/lib/ycom_user.php +++ b/lib/ycom_user.php @@ -17,10 +17,10 @@ public function isInGroup(int $group_id): bool { $ycom_groups = (string) $this->getValue('ycom_groups'); - if ('' == $group_id) { + if ('' === $group_id) { return true; } - if ('' != $ycom_groups) { + if ('' !== $ycom_groups) { $ycom_groups_array = explode(',', $ycom_groups); if (in_array((string) $group_id, $ycom_groups_array, true)) { return true; @@ -40,7 +40,7 @@ public function getPassword(): string */ public function getGroups(): array { - if ('' == $this->getValue('ycom_groups')) { + if ('' === $this->getValue('ycom_groups')) { return []; } diff --git a/lib/yform/value/ycom_user.php b/lib/yform/value/ycom_user.php index 802397a5..753b75e4 100644 --- a/lib/yform/value/ycom_user.php +++ b/lib/yform/value/ycom_user.php @@ -18,7 +18,7 @@ public function enterObject(): void $wc = $this->params['warning'][$this->getId()]; } - if ('hidden' != trim($this->getElement(4))) { + if ('hidden' !== trim($this->getElement(4))) { $this->params['form_output'][$this->getId()] = '

@@ -27,7 +27,7 @@ public function enterObject(): void } $this->params['value_pool']['email'][$this->getElement(1)] = stripslashes($this->getValue()); - if ('no_db' != $this->getElement(5)) { + if ('no_db' !== $this->getElement(5)) { $this->params['value_pool']['sql'][$this->getElement(1)] = $this->getValue(); } } diff --git a/pages/docs.php b/pages/docs.php index 54f0c2f5..30bdb8fd 100644 --- a/pages/docs.php +++ b/pages/docs.php @@ -25,7 +25,7 @@ (new rex_be_page($key, rex_i18n::msg('ycom_docs_' . $keyWithoudPrio))) ->setSubPath($mdFile) ->setHref('index.php?page=ycom/docs&mdfile=' . $key) - ->setIsActive($key == $currenMDFile), + ->setIsActive($key === $currenMDFile), ); } } diff --git a/plugins/auth/boot.php b/plugins/auth/boot.php index ff755f47..1fa2c729 100644 --- a/plugins/auth/boot.php +++ b/plugins/auth/boot.php @@ -87,7 +87,7 @@ $params = $ep->getParams(); /** @var rex_yform_manager_table $table */ $table = $params['table']; - if (rex::getTablePrefix() . 'ycom_user' == $table->getTableName()) { + if (rex::getTablePrefix() . 'ycom_user' === $table->getTableName()) { if (rex::getUser() && rex::getUser()->isAdmin()) { $actionButtons = $ep->getSubject(); $actionButtons['ycom_impersonate'] = [ diff --git a/plugins/auth/install.php b/plugins/auth/install.php index 0d7d19c0..6af7d865 100644 --- a/plugins/auth/install.php +++ b/plugins/auth/install.php @@ -10,7 +10,7 @@ $articleTable = rex_sql_table::get(rex::getTable('article')); if ($articleTable->hasColumn('ycom_auth_type')) { $Column = $articleTable->getColumn('ycom_auth_type'); - if (null !== $Column && 'enum' == substr($Column->getType(), 0, 4)) { + if (null !== $Column && 'enum' === substr($Column->getType(), 0, 4)) { $articleAuthTypeWasEnum = true; } }