diff --git a/lam/lib/2factor.inc b/lam/lib/2factor.inc index f2ac9dd47..415792f08 100644 --- a/lam/lib/2factor.inc +++ b/lam/lib/2factor.inc @@ -23,7 +23,7 @@ use Webauthn\PublicKeyCredentialCreationOptions; /* This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2017 - 2024 Roland Gruber + Copyright (C) 2017 - 2025 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1081,7 +1081,7 @@ class TwoFactorProviderService { * * @param selfServiceProfile|LAMConfig $configObj profile */ - public function __construct(&$configObj) { + public function __construct(selfServiceProfile|LAMConfig $configObj) { if ($configObj instanceof selfServiceProfile) { $this->config = $this->getConfigSelfService($configObj); } diff --git a/lam/lib/html.inc b/lam/lib/html.inc index a6626b7a0..de2fee554 100644 --- a/lam/lib/html.inc +++ b/lam/lib/html.inc @@ -567,9 +567,9 @@ class htmlInputField extends htmlElement { /** * Constructor * - * @param String $fieldName unique field name - * @param String $fieldValue value of input field (optional) - * @param String $fieldSize input field length (default 30) + * @param string $fieldName unique field name + * @param string $fieldValue value of input field (optional) + * @param string|null $fieldSize input field length (default 30) */ function __construct($fieldName, $fieldValue = null, $fieldSize = null) { if (isObfuscatedText($fieldValue)) { @@ -632,15 +632,15 @@ class htmlInputField extends htmlElement { $idValue = $this->id ?? $this->fieldName; $id = ' id="' . $idValue . '"'; $value = ''; - if ($this->fieldValue != null) { + if ($this->fieldValue !== null) { $value = ' value="' . $this->fieldValue . '"'; } $maxLength = ''; - if ($this->fieldMaxLength != null) { + if ($this->fieldMaxLength !== null) { $maxLength = ' maxlength="' . $this->fieldMaxLength . '"'; } $size = ''; - if ($this->fieldSize != null) { + if ($this->fieldSize !== null) { $size = ' size="' . $this->fieldSize . '"'; } $inputType = $this->type; @@ -777,7 +777,7 @@ class htmlInputField extends htmlElement { /** * Sets the field size (default is 30). * - * @param int $fieldSize size + * @param string|null $fieldSize size */ public function setFieldSize($fieldSize) { $this->fieldSize = $fieldSize;