Skip to content

AddArrowFunctionReturnTypeRector wants to add illegal :void #7615

@gregor-tb

Description

@gregor-tb

Bug Report

Subject Details
Rector version 0.14.8

AddArrowFunctionReturnTypeRector rule adds return type ": void" to some arrow functions, but (at least in php 8.0) this is not valid.

See https://getrector.org/demo/baa80f25-d170-4a67-a78d-54ff1f1c0e6f

Expected Behaviour

Ignore void, add only valid types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions