phpstan-src
phpstan-src copied to clipboard
PHPStan's source code. This is where development happens. Check https://github.com/phpstan/phpstan for the distribution repository.
Fixes https://phpstan.org/r/8ff9bc8f-4162-4ccf-bf5c-8b3d2061e68d Partially fixes: https://github.com/phpstan/phpstan/issues/10396 Related to https://github.com/phpstan/phpstan-src/pull/3282#issuecomment-2306883685
Closes https://github.com/phpstan/phpstan/issues/3979 which can be simplified to https://phpstan.org/r/ef72a996-8fbe-4a4e-831f-4d78c542ad19 I'm not sure there is a better (easy ?) fix for this issue. `is_subclass_of($string, $bar)` specify the type of `$string` to class-string...
With this, we can recognize those cases: ```php class Parnt { public function __construct() { array_map([self::class, 'method1'], [1]); // calls Parnt::method1 array_map([$this, 'method1'], [1]); // calls Child::method1 } public function...
Hello, I am trying to make use of generics work when using traits from traits (see https://github.com/phpstan/phpstan/issues/9630). It works totally fine when using a single file, but not when separating...
Returns a constant when `$num` parameter and option of the round function are constants. In this case , the conventional type is returned. - `$num` parameter is a numeric string....
closes https://github.com/phpstan/phpstan/issues/11488
Closes phpstan/phpstan#11495
Under construction: https://github.com/phpstan/phpstan/issues/9346
As promised a [long time ago](https://github.com/phpstan/phpstan/issues/7668#issuecomment-1191379214), I submit my first real attempt to narrow the type after `if ($a != "") ...` This is by no means a complete analysis...