A return type can be covariant. Without generics, this works as expected (for PHP 7.4+): https://phpstan.org/r/0adea38a-7c7f-40da-8e9a-0c631e005aee
For the same code with added generics PHPStan complains that return types are not compatible: https://phpstan.org/r/40573216-1e55-49cb-a9bb-a66a7717f91f
PHPStan 0.12.52. Worked with 0.12.50.