gpt4 book ai didi

PHP 代码风格修正器 : put space between colon and method's return type

转载 作者:行者123 更新时间:2023-12-05 01:45:41 25 4
gpt4 key购买 nike

有没有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.

Try it out

关于PHP 代码风格修正器 : put space between colon and method's return type,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40742557/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com