diff --git a/include/controls_compat.php b/include/controls_compat.php index d1c2c12b5..5a2a9f2ba 100644 --- a/include/controls_compat.php +++ b/include/controls_compat.php @@ -1,7 +1,9 @@ $attributes + */ +function stylesheet_tag(string $filename, array $attributes = []): string { $attributes_str = \Controls\attributes_to_string( array_merge( @@ -16,7 +18,10 @@ function stylesheet_tag($filename, $attributes = []) { return "\n"; } -function javascript_tag($filename, $attributes = []) { +/** + * @param array $attributes + */ +function javascript_tag(string $filename, array $attributes = []): string { $attributes_str = \Controls\attributes_to_string( array_merge( [ @@ -29,26 +34,26 @@ function javascript_tag($filename, $attributes = []) { return "\n"; } -function format_warning($msg, $id = "") { +function format_warning(string $msg, string $id = ""): string { return "
$msg
"; } -function format_notice($msg, $id = "") { +function format_notice(string $msg, string $id = ""): string { return "
$msg
"; } -function format_error($msg, $id = "") { +function format_error(string $msg, string $id = ""): string { return "
$msg
"; } -function print_notice($msg) { +function print_notice(string $msg): string { return print format_notice($msg); } -function print_warning($msg) { +function print_warning(string $msg): string { return print format_warning($msg); } -function print_error($msg) { +function print_error(string $msg): string { return print format_error($msg); }