We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
I have this code :
$content = $client->getResponse()->getContent(); $this->assertIsString($content); $this->assertJson($content);
phpstan throws an error:
Parameter #1 $actualJson of method PHPUnit\Framework\Assert::assertJson() expects string, string|false given.
I expect that phpstan understand that if assertIsString($content) passed, $content is a string, and phpstan should not throw an error.
assertIsString($content)
$content
My composer file:
"require-dev": { "phpstan/phpstan": "^0.11", "phpstan/phpstan-phpunit": "^0.11", [...] }
The text was updated successfully, but these errors were encountered:
Hi, upgrade to ^0.12, assertIsString is supported there.
assertIsString
You shouldn't have any problems upgrading to the latest versions. If you don't have time to fix newly reported errors now, you can take advantage of a feature called the baseline: https://medium.com/@ondrejmirtes/phpstans-baseline-feature-lets-you-hold-new-code-to-a-higher-standard-e77d815a5dff
Sorry, something went wrong.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
No branches or pull requests
Hi,
I have this code :
phpstan throws an error:
I expect that phpstan understand that if
assertIsString($content)
passed,$content
is a string, and phpstan should not throw an error.My composer file:
The text was updated successfully, but these errors were encountered: