Support type rules.
Say we have a class MyClass it should be possible to do :
Matcher::match(new MyClass(), ['MyClass' => $function]);
This could however have impact on identifiers, how do we avoid creating issues with them ?
Maybe something like :
Matcher::match(new MyClass(), ['MyClass <identifier>' => $function]);
The "MyClass" parts becaming a constraint on the following identifier. This way we could also enforce types using patterns like "int a" or "bool a".
Support type rules.
Say we have a class
MyClassit should be possible to do :This could however have impact on identifiers, how do we avoid creating issues with them ?
Maybe something like :
The "MyClass" parts becaming a constraint on the following identifier. This way we could also enforce types using patterns like
"int a"or"bool a".