From f090c8a4944898dba27771177cac3ab5445848b6 Mon Sep 17 00:00:00 2001 From: skycel Date: Wed, 5 Feb 2025 02:45:05 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20-=20Am=C3=A9lioration=20des=20ty?= =?UTF-8?q?pes=20de=20param=C3=A8tres=20et=20retours=20dans=20les=20foncti?= =?UTF-8?q?ons?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- includes/functions.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/functions.inc.php b/includes/functions.inc.php index c6809bc..e2e2d61 100644 --- a/includes/functions.inc.php +++ b/includes/functions.inc.php @@ -41,7 +41,7 @@ function array_merge_recursive_distinct(array ...$arrays): array { * @param string $dir Path to the directory to check. * @return bool True if the directory is empty, false otherwise. */ -function is_dir_empty($dir): bool { +function is_dir_empty(string $dir): bool { return (count(scandir($dir)) == 2); } @@ -49,9 +49,9 @@ function is_dir_empty($dir): bool { * Retrieves the URL of the blog archive for the specified blog ID. * * @param int|null $blog_id The ID of the blog. If null, uses the current blog ID. - * @return string The URL of the blog archive. + * @return bool|string The URL of the blog archive. */ -function get_blog_url($blog_id = null) { +function get_blog_url(int $blog_id = null): false|string { if (null === $blog_id) $blog_id = get_current_blog_id(); if (get_current_blog_id() !== $blog_id && get_blogaddress_by_id($blog_id)) switch_to_blog($blog_id);