Skip to content

Instantly share code, notes, and snippets.

Created September 25, 2012 21:34
Show Gist options
  • Save anonymous/3784593 to your computer and use it in GitHub Desktop.
Save anonymous/3784593 to your computer and use it in GitHub Desktop.
Which way of writing do you like more?
// first way
// standard
$example->foo(2, 2)->andReturn(4)
->foo(4, 4)->andReturn(8)
->foo(8, 8)->andReturn(16);
// second way
// Same functionality as well indented and the first line is as readable as the following lines.
$example
->foo(2, 2)->andReturn(4)
->foo(4, 4)->andReturn(8)
->foo(8, 8)->andReturn(16);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment