Skip to content

How to add type for a argument that has an array as a default value? #8423

@exts

Description

@exts

Question

How do I get rector to generate array argument parameters for array's that are default values example:

public function example($array = []) 
{
    return $array;
}
public function example(array $array = []) : array
{
    return $array;
}

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