Skip to content

Support type rules #2

Description

@krtek4

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".

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions