-
I want to mark a Doctrine entity $id field that is autogenerated by database engine as `@var positive-int`. However PHPStan complains.
```php
class Entity
{
/**
* @var positive-int|nul…
-
As proposed in #76.
-
https://github.com/phpstan/phpstan
-
### Bug report
This indicates an error in _my_ code, but the crash is unexpected. I'm providing the bug report and stack trace as the PHPStan output requests, but through some quick trial-and-error I…
-
## Feature Description
The use of `empty()` and `isset( $var )` can mask code problems (e.g. typos). And they rarely need to be used, for example:
* https://www.beberlei.de/post/when_to_use_empt…
-
Hi,
I installed the plugin and it works fine. But when i run phpstan, i got following errors :
- on Product.php : `Method App\Entity\Product\Product::getRichSnippetSubjectParent() should return…
-
### Bug Report
| Q | A
|------------ | ------
| BC Break | no
| Version | 2.19.5
#### Summary
For some complex queries, I use the following pattern in a repository:
`…
-
```php
class A
{
public int $a;
public array $other;
}
class B
{
public int $b;
}
/** @param A&object{other: array} $x */
function hello(object $x): void
{
$other = $x…
-
### Feature request
We could mark parameters that expect a regular expression in 3rd party libraries like Nette\Utils\Strings or composer/pcre.
Arguments could be validated similarly to how argume…
-
### Bug report
class.nameCase error is not reported when the correct case is used in `use` statement and wrong case is used in return type
### Code snippet that reproduces the problem
https:/…