weixin_39601194 2020-11-30 02:12 采纳率: 0%
浏览 0

phpcbf closes Control Structure on the same line

phpcbf --standard=WordPress-Core cs.php corrects

 php
if ( nocontrolstructure() )
    return false;

as

 php
if ( nocontrolstructure() ) {
    return false; }

But phpcbf --standard=PSR-2 cs.php works OK

 php
if (nocontrolstructure()) {
    return false;
}

Please advise.

该提问来源于开源项目:WordPress/WordPress-Coding-Standards

  • 写回答

1条回答 默认 最新

  • weixin_39601194 2020-11-30 02:12
    关注

    phpcbf --standard=PSR2 --sniffs=Generic.ControlStructures.InlineControlStructure,Squiz.WhiteSpace.ScopeClosingBrace cs.php is a work-around.

    评论

报告相同问题?