From 3b90321b299384f7c030f9dba3929ac6ba76c189 Mon Sep 17 00:00:00 2001 From: Hrayr Date: Fri, 14 Aug 2020 22:41:18 +0400 Subject: [PATCH] Correct ServerRequest::getParam method PHPDoc The PHPDoc type of ServerRequest class getParam method's $default argument is changed from "string" to "mixed", as dependent on request parameter its default value can be expected to have another type(e.g. boolean). And if there is a PHPStan or other analyser running in project an error is reported on cases, where $default argument type is not string. So as there is no obstacle for doing this change, it is correct to change PHPDoc type of the argument. --- src/ServerRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ServerRequest.php b/src/ServerRequest.php index b09c6ca..659bec9 100644 --- a/src/ServerRequest.php +++ b/src/ServerRequest.php @@ -552,7 +552,7 @@ public function getMediaTypeParams(): array * Note: This method is not part of the PSR-7 standard. * * @param string $key The parameter key. - * @param string $default The default value. + * @param mixed $default The default value. * * @return mixed The parameter value. */