From 27880c4b30e682f0c3ce40c310f3d3bd5d48c50b Mon Sep 17 00:00:00 2001 From: Brian Stoop Date: Mon, 11 Nov 2024 15:40:55 +0100 Subject: [PATCH 1/2] Corona: Fix unexpected token in PHPdoc types --- src/Lunr/Corona/HTMLView.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Lunr/Corona/HTMLView.php b/src/Lunr/Corona/HTMLView.php index bbe8481b..95cbb14c 100644 --- a/src/Lunr/Corona/HTMLView.php +++ b/src/Lunr/Corona/HTMLView.php @@ -20,13 +20,13 @@ abstract class HTMLView extends View /** * List of javascript files to include. - * @var array; + * @var array */ protected $javascript; /** * List of stylesheets to include. - * @var array; + * @var array */ protected $stylesheets; From 9736e1348dc2de57df0015477ef221ea0f531c70 Mon Sep 17 00:00:00 2001 From: Brian Stoop Date: Mon, 11 Nov 2024 16:15:27 +0100 Subject: [PATCH 2/2] Corona: Fix phpstan warnings for new stricter rules --- src/Lunr/Corona/RequestParser.php | 2 +- src/Lunr/Corona/RequestParserInterface.php | 2 +- src/Lunr/Corona/Response.php | 2 +- src/Lunr/Corona/WebRequestParser.php | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Lunr/Corona/RequestParser.php b/src/Lunr/Corona/RequestParser.php index 1b4f172e..c474498d 100644 --- a/src/Lunr/Corona/RequestParser.php +++ b/src/Lunr/Corona/RequestParser.php @@ -142,7 +142,7 @@ public function parse_cookie() /** * Parse php://stdin value. * - * @return string Parsed php://stdin value + * @return string|false Parsed php://stdin value */ public function parse_raw_data() { diff --git a/src/Lunr/Corona/RequestParserInterface.php b/src/Lunr/Corona/RequestParserInterface.php index b66e3a1b..0ea8cd2e 100644 --- a/src/Lunr/Corona/RequestParserInterface.php +++ b/src/Lunr/Corona/RequestParserInterface.php @@ -62,7 +62,7 @@ public function parse_cookie(); /** * Parse php://input values into local variable. * - * @return string Parsed php://input values + * @return string|false Parsed php://input values */ public function parse_raw_data(); diff --git a/src/Lunr/Corona/Response.php b/src/Lunr/Corona/Response.php index 8319d38b..e2d5b43e 100644 --- a/src/Lunr/Corona/Response.php +++ b/src/Lunr/Corona/Response.php @@ -154,7 +154,7 @@ public function set_error_info($identifier, $value) * Set a return code for the given call identifier. * * @param string $identifier Call identifier - * @param int $value Return code + * @param mixed $value Return code * * @return void */ diff --git a/src/Lunr/Corona/WebRequestParser.php b/src/Lunr/Corona/WebRequestParser.php index 183fd22a..21a76cbb 100644 --- a/src/Lunr/Corona/WebRequestParser.php +++ b/src/Lunr/Corona/WebRequestParser.php @@ -170,7 +170,7 @@ public function parse_request() $request['id'] = str_replace('-', '', uuid_create()); } - if (!is_array($_GET) || empty($_GET)) + if (empty($_GET)) { if (isset($request['controller'], $request['method']) === TRUE) { @@ -209,7 +209,7 @@ public function parse_request() /** * Parse super global variables. * - * @param array $_VAR Reference to a super global variable + * @param mixed $_VAR Reference to a super global variable * @param bool $reset Whether to reset the super global variable * * @return array $var Parsed variable @@ -280,7 +280,7 @@ public function parse_get() /** * Parse php://input value. * - * @return string Parsed php://input value + * @return string|false Parsed php://input value */ public function parse_raw_data() {