-
### Bug report
array_key_exists does not recognize that key is always set in nested array shape
Hi. Please see https://phpstan.org/r/bb22f718-27af-47dd-9bd7-643dd5516474. Best regards
### Code …
-
right now I'm having to check the type on each call (mixed return), which is a lot. Not sure if this is possible, but thought I'd ask.
-
I keep getting this error in phpstan:
`Non-static method Illuminate\Auth\Access\Gate::policy() should not be called statically`
-
## How to reproduce the issue:
Make following change to Drupal core 10.1.x and run `./vendor/bin/phpstan analyze -c phpstan.neon core/modules/user/src/Form/EntityPermissionsForm.ph` command and it …
-
Implement Code Quality Automation in Project on every Commit and Pull Request.
Tools can be used;
- PHPCS
- PHPSTAN
- PHPLINT
-
# Bug report
I run PHPStan version 1.8.2 with phpstan-strict rules 1.3.0 on max level.
I try to create a simple function that calls `session_set_cookie_params()` with some default values and…
-
# Bug report
I encountered this with Doctrine collections and simplified it to reproduce in phpstan.org. Based on the `@template` annotations, I think PHPStan should be aware that the closure retur…
-
### Symfony version(s) affected
6.2.3
### Description
`list` annotation in phpstan and psalm are
> Lists are arrays with sequential integer keys starting at 0.
But when annotating an array li…
-
### Bug report
I was trying to solve a PHPStan error in my code, where I had to remap a type of an optional array key.
I used `if (isset($a['key'])) { ... }` to catch the case and completely rewrite…
-
# Bug report
PHPStan says that an expression with count = 1 and an in_array check on a particular value is always true, but it's not as that value may not be in the list.
### Code snippet that r…