Question: PHP Code Style Fixer: put space between colon and method's return type

Question

PHP Code Style Fixer: put space between colon and method's return type

Answers 1
Added at 2016-11-22 14:11
Tags
Question

Is there a PHP CS Fixer fixer available that will put space between colon and return type? Fixer should correct this signature:

public function modifyFeatureFlags(array $feature_flags):array
{
}

to:

public function modifyFeatureFlags(array $feature_flags): array
{
}

The list of available fixers is long, and I have hard time finding the correct one.

Answers
nr: #1 dodano: 2016-11-22 23:11

From README.md

return_type_declaration [@Symfony]

There should be no space before colon and one space after it in return type declaration.

Be aware that it't on current dev line, no stable release yet with this feature.

Source Show
◀ Wstecz