Don't forget, much of that effort has now trickled down into the PHP language itself. We've long had scalar types for function parameters and return values, but with 7.4 and 8.0 we've added union types[1], nullable types[2], and typed properties[3]. While not a part of the language yet, generics can be annotated with the linting tools PHPStan and Psalm[4], and native support for these annotations is coming to the next release of PhpStorm[5].
Using PhpStorm, I've worked with 100 kloc PHP codebases where almost every type was inspectable. And the language support and tooling are only getting better all the time.
1: https://stitcher.io/blog/new-in-php-8
2: https://www.php.net/manual/en/migration71.new-features.php
3: https://stitcher.io/blog/typed-properties-in-php-74
4: https://phpstan.org/blog/generics-in-php-using-phpdocs
5: https://blog.jetbrains.com/phpstorm/2020/07/phpstan-and-psal...