From 6baa21b459fb5a50224414737520b3688078688a Mon Sep 17 00:00:00 2001 From: Alexander Van der Bellen Date: Tue, 5 Sep 2023 13:06:51 +0800 Subject: [PATCH] [#272] Make code checker and phpdoc happy Add @param description Potential CI fix --- classes/script_metadata.php | 6 +++--- tests/tool_excimer_script_metadata_test.php | 10 +++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/classes/script_metadata.php b/classes/script_metadata.php index eedcdc5..75f1a2d 100644 --- a/classes/script_metadata.php +++ b/classes/script_metadata.php @@ -226,9 +226,9 @@ public static function get_request(): string { /** * Gets the name of the script. - * Parameters are share the names of globals as a hint to the caller. - * @param string $ME - * @param string $SCRIPT + * Parameters share the names of globals as a hint to the caller. + * @param string|null $ME + * @param string|null $SCRIPT * @return string the request path for this profile. */ public static function get_normalised_relative_script_path(?string $ME, ?string $SCRIPT): string { diff --git a/tests/tool_excimer_script_metadata_test.php b/tests/tool_excimer_script_metadata_test.php index 0ea0d23..0fea979 100644 --- a/tests/tool_excimer_script_metadata_test.php +++ b/tests/tool_excimer_script_metadata_test.php @@ -192,6 +192,9 @@ public function sampling_limit_provider(): array { * Tests script_metadata::get_request(). * @dataProvider normalised_relative_script_path_provider * @covers \tool_excimer\script_metadata::get_request + * @param string $path + * @param string $oldexpected + * @param string $newexpected */ public function test_get_request(string $path, string $oldexpected, string $newexpected) { script_metadata::init(); @@ -213,8 +216,9 @@ public function test_get_request(string $path, string $oldexpected, string $newe * Tests script_metadata::get_normalised_relative_script_path(). * @dataProvider normalised_relative_script_path_provider * @covers \tool_excimer\script_metadata::get_normalised_relative_script_path - * @param string $pathinfo - * @param string $expected + * @param string $path + * @param string $oldexpected + * @param string $newexpected */ public function test_get_normalised_relative_script_path(string $path, string $oldexpected, string $newexpected) { script_metadata::init(); @@ -224,7 +228,7 @@ public function test_get_normalised_relative_script_path(string $path, string $o /** * Provider for test_get_normalised_relative_script_path(). - * @return \string[][] + * @return array[] */ public function normalised_relative_script_path_provider(): array { return [