Skip to content

Improve documentation of rule "TypedPropertyFromCreateMockAssignRector" #9129

@jmfeurprier

Description

@jmfeurprier

Like reporters of issues 9124 and 9126, I was surprised of the behavior of the new TypedPropertyFromCreateMockAssignRector rule (MockObject & ObjectClass union type being replaced by the single MockObject type).

In both ticket, the answer was:

Purpose of this rule is different, feel free to skip it.

Documentation of this rule states:

Add typed property from assigned mock

and the code example shows the rule adds MockObject when there is no type defined.

I think the documentation needs a longer explanation of the purpose, as it will, I think, drive other rector users to the issues/documentation pages due to the "surprising" behavior.

Thanks for the great tool!

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