Skip to content

Space around "?" on nullable type hints #36

@eddiriarte

Description

@eddiriarte

this:

protected function firstItem(): ?CustomClass
{
    if (count($this->list) < 1) {
        return null;
    }

    return $this->list[0];
}

is beeing transformed to....

protected function firstItem():  ? CustomClass
{
    if (count($this->list) < 1) {
        return null;
    }

    return $this->list[0];
}

Due to several complainings with my colleages I disabled the "space resizing"

"excludes":
[
	"ResizeSpaces"
],

... anyway maybe you could find a way to fix this in the next versions. THX

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions