相关文章推荐
欢乐的佛珠  ·  Maxwell的vbs脚本转matlab ...·  1 年前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

Pretty basic stuff. STRG or CTRL + ALT + l reformats the code, but in a way that is rather strange:

    if ( $a > $b )
        echo "a is größer als b";
        if ( $a == $b )
            echo "a ist gleich groß wie b";
            echo "a ist kleiner als b";

There is no template or anything that I would know of that could trigger this. Nevertheless, it is a nuisance to have the code changed in such a kind of way.

The question is: how can I prevent PhpStorm from doing this. It appears only in since the latest update of the software (PhpStorm 2016.2.2) not in earlier ones.

The version of PhpStorm is

  • PhpStorm 2016.2.2
  • Build #PS-162.2380.11, built on October 24, 2016
  • JRE: 1.8.0_112-release-287-b3 amd64
  • JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
  • That the else if construct is not being broken apart in such a manner. The thing is that elseif remains the same after a code refactoring, while else if does not. This is something that has changed with the latest update – user4494495 Nov 3, 2016 at 6:40 I'm confused by this being the default behavior and that I need 'special treatment' for it to leave my code alone. Very silly. – jxmallett Nov 20, 2017 at 4:38 That appears to be new. I must have overlooked it. Sadly, it does not reverse the mess that it had created in the first place. As this had only been at one point in my code, not much harm had been done. Thanks. – user4494495 Nov 3, 2016 at 6:53

    Thanks for contributing an answer to Stack Overflow!

    • Please be sure to answer the question. Provide details and share your research!

    But avoid

    • Asking for help, clarification, or responding to other answers.
    • Making statements based on opinion; back them up with references or personal experience.

    To learn more, see our tips on writing great answers.