Skip to content

Commit 3b90321

Browse files
authored
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.
1 parent 90506ff commit 3b90321

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ServerRequest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ public function getMediaTypeParams(): array
552552
* Note: This method is not part of the PSR-7 standard.
553553
*
554554
* @param string $key The parameter key.
555-
* @param string $default The default value.
555+
* @param mixed $default The default value.
556556
*
557557
* @return mixed The parameter value.
558558
*/

0 commit comments

Comments
 (0)