Created
December 19, 2013 23:58
-
-
Save rodjek/8048366 to your computer and use it in GitHub Desktop.
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
class foo( | |
$bar, | |
$baz = true, | |
$gronk = false, | |
) { | |
# ... | |
} |
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
class foo( | |
$bar, | |
$baz = true, | |
$gronk = false, | |
) { | |
# ... | |
} |
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
class foo($bar, $baz = true, $gronk = false) { | |
# ... | |
} |
Option 1 is how most of us PS folk will do it (with a space between the class name and curly brace)
Like @shaftoe here at @camptocamp, but I usually go for option 1 lately, regardless of the number of arguments.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I put the curly brace on its own line, without indentation, which is closest to 2 I guess. Like shaftoe, Option 3 can be used when the number of parameters is small (3-4 max) and it fits in 80 columns.