-
php-parser-nodes-docs
Visual documentation of PHP Parser nodes, to help you learn AST, how to create nodes and analyse them
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
PHP extensions in general *could* do what you are asking for, because as said before they have access to this information. I see this as a combination of parsing PHP docblocks and automatically generating assert() calls right at the beginning of the function. Changing the AST is possible with a hook in an extensoin, here is a prototype of mine doing it: https://github.com/beberlei/php-ast-tracer-poc
You can easily modify rule to handle it, just check for $classMethod->params(), then $param->type, see: https://github.com/rectorphp/php-parser-nodes-docs#phpparsernodeparam
It infers only native PHP types and autocompletes them everywhere where possible, e.g. based on constructor types: https://github.com/rectorphp/rector/blob/master/docs/rector_rules_overview.md#typedpropertyfromstrictconstructorrector