PHP-CS-Fixer Spaces around param and return types e.g. int|string -> int | string

44 views Asked by At

I've tried playing with the binary_operator_spaces rule with no luck e.g. variants of:

        "binary_operator_spaces": { "default":  "at_least_single_space",
            "operators": {
                "|": "single_space"
            }
        }

However was hoping there was a rule that can enforce spacing between return types and param types.

function test(int|string $value): Model|string

should turn into

function test(int | string $value): Model | string

Are there any rules that can be used for this?

0

There are 0 answers