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.
From README.md
return_type_declaration [@Symfony]
There should be one or no space before colon and one space after it in return type declaration.
Try it out
As stated by @keradus, there is return_type_declaration for that.
If you (or anyone else) would like to use a sniff for PHP_CodeSniffer, there is ReturnTypeHintSpacingSniff from slevomat/coding-standard.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With