Skip to content

Commit

Permalink
Correct ServerRequest::getParam method PHPDoc
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
hhovakimyan committed Aug 14, 2020
1 parent 90506ff commit 3b90321
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ServerRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down

0 comments on commit 3b90321

Please sign in to comment.