Created
August 9, 2012 12:58
-
-
Save tom--/3303986 to your computer and use it in GitHub Desktop.
PhpStorm Code: Reformat Code wierdness
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// On my mac, cmd-opt-L reformats my php files according to the code style in effect. | |
// The following is how PhpStorm auto-formats this statement. | |
// What do I have to set in the code style so it comes out right? | |
if (isset( | |
$_SESSION['one'], | |
$_SESSION['two'], | |
$_SESSION['three'], | |
$_SESSION['four'], | |
$_SESSION['five'] | |
) | |
&& $_SESSION['one'] | |
&& $_SESSION['two'] >= 2 | |
&& $_SESSION['four'] !== '0' | |
) { | |
// something | |
} | |
// A reasonable format, that i had before pressing cmd-opt-L, is: | |
if (isset( | |
$_SESSION['one'], | |
$_SESSION['two'], | |
$_SESSION['three'], | |
$_SESSION['four'], | |
$_SESSION['five'] | |
) | |
&& $_SESSION['one'] | |
&& $_SESSION['two'] >= 2 | |
&& $_SESSION['four'] !== '0' | |
) { | |
// something | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment