Add type hint and return type

This commit is contained in:
Mark Nelson 2021-05-27 22:49:57 +08:00
parent e65cf7e9c2
commit 8145e020e4

View file

@ -47,7 +47,7 @@ class helper {
* @param string $tableprefix table query prefix to use in front of each field.
* @return string All name fields.
*/
public static function get_all_user_name_fields($tableprefix = '') {
public static function get_all_user_name_fields(string $tableprefix = ''): string {
$alternatenames = [];
foreach (fields::get_name_fields() as $field) {
$alternatenames[$field] = $field;