Skip to content

Instantly share code, notes, and snippets.

@mathiasverraes
Created January 5, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mathiasverraes/5d37ddf1ca2d6f5770e1 to your computer and use it in GitHub Desktop.
Save mathiasverraes/5d37ddf1ca2d6f5770e1 to your computer and use it in GitHub Desktop.
class MyClass
{
/**
* Lots of comments
*/
public function importantMethodAtTheTop()
{ // braces on new lines
// lots of newlines to create structure
// important code hightlighted
}
// Unimportant code, single lines, no blank lines, no comments, bottom of the class
public function getFoo() { return $this->foo; }
public function getBar() { return $this->bar; }
// boring data you don't want people to read goes at the bottom,
// in a single line that exceeds 80 char limit, no spaces
private $boringdata = ["AD"=>"Andorra","AE"=>"UnitedArabEmirates","AF"=>"Afghanistan","AG"=>"AntiguaAndBarbuda","AI"=>"Anguilla","AL"=>"Albania","AM"=>"Armenia","AN"=>"NetherlandsAntilles","AO"=>"Angola","AQ"=>"Antarctica","AR"=>"Argentina","AS"=>"AmericanSamoa","AT"=>"Austria","AU"=>"Australia","AW"=>"Aruba", ...]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment