Instance template parameters should not be made available to static methods – this was a flaw in my implementation, now fixed. If/when generics are available at the language level this can be re-evaluated.
/**
* @template T
*/
class C {
/**
* @param T $t
*/
public static function foo($t) : void {}
}
https://phpstan.org/r/e00cd9e1-3aba-4e6c-ab9a-8e63da122b94
Expected: some sort of error (in Psalm for now it just treats it as a missing docblock class, you may want something more helpful).