有没有PHP CS Fixer可用的修复程序将在冒号和返回类型之间放置空格? Fixer 应该更正这个签名:
public function modifyFeatureFlags(array $feature_flags):array
{
}
到:
public function modifyFeatureFlags(array $feature_flags): array
{
}
可用修复程序列表很长,我很难找到正确的修复程序。
最佳答案
来自 README.md
return_type_declaration [@Symfony]
There should be one or no space before colon and one space after it in return type declaration.
关于PHP 代码风格修正器 : put space between colon and method's return type,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40742557/