before_login_btn hook + system conf attributes (#7761)

* `before_login_btn` hook + system conf attributes

* phpstan fix

* Refactoring

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
This commit is contained in:
InverleandAlexandre Alapetite authored and GitHub committed 2025-07-30 08:03:04 +02:00
1 parent e967b07589
commit e33ef74af9
8 files changed
+68 -43

No files matched your search

-35
View File
@@ -105,39 +105,4 @@ final class FreshRSS_UserConfiguration extends Minz_Configuration {
}
return $default_user_conf;
}
/**
* @param non-empty-string $key
* @return array<int|string,mixed>|null
*/
public function attributeArray(string $key): ?array {
$a = parent::param($key, null);
return is_array($a) ? $a : null;
}
/** @param non-empty-string $key */
public function attributeBool(string $key): ?bool {
$a = parent::param($key, null);
return is_bool($a) ? $a : null;
}
/** @param non-empty-string $key */
public function attributeInt(string $key): ?int {
$a = parent::param($key, null);
return is_numeric($a) ? (int)$a : null;
}
/** @param non-empty-string $key */
public function attributeString(string $key): ?string {
$a = parent::param($key, null);
return is_string($a) ? $a : null;
}
/**
* @param non-empty-string $key
* @param array<string,mixed>|mixed|null $value Value, not HTML-encoded
*/
public function _attribute(string $key, $value = null): void {
parent::_param($key, $value);
}
}