-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHPDoc of Slim\Http\Request::getParams it's wrong #2890
Comments
In the latest version of /**
* Fetch associative array of body and query string parameters.
*
* Note: This method is not part of the PSR-7 standard.
*
* @return mixed[]
*/
public function getParams(): array But I could not find a A Phpstan scan didn't give me any errors. Do you use Slim 3 or Slim 4? |
Sorry, I forgot to put the version we are using. We are in the version Here is the line in 3.11.0 https://github.com/slimphp/Slim/blob/3.11.0/Slim/Http/Request.php#L1207 |
That's actually an error. We should fix that, it can only return an array. |
Hello, In my project we use PHPStan for the static analysis, and throw me an error from the method
getParams
from\Slim\Http\Request
because say the method can return null or array.But i reviewd the two returns of the method and in both only return an array, that are or
$onlyParams
or$params
, is the PHPDocreturn
wrong?The text was updated successfully, but these errors were encountered: