Skip to content

Instantly share code, notes, and snippets.

@rodjek
Created December 19, 2013 23:58
Show Gist options
  • Save rodjek/8048366 to your computer and use it in GitHub Desktop.
Save rodjek/8048366 to your computer and use it in GitHub Desktop.
class foo(
$bar,
$baz = true,
$gronk = false,
) {
# ...
}
class foo(
$bar,
$baz = true,
$gronk = false,
) {
# ...
}
class foo($bar, $baz = true, $gronk = false) {
# ...
}
@kjetilho
Copy link

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.

@glarizza
Copy link

Option 1 is how most of us PS folk will do it (with a space between the class name and curly brace)

@raphink
Copy link

raphink commented Dec 20, 2013

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