Created
May 12, 2016 13:26
-
-
Save tiggreen/4a5106313f26d9dee371a7547960a81d to your computer and use it in GitHub Desktop.
psr-2-sample.php
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
// PSR2 codin standard | |
class Foo extends Bar implements FooInterface | |
{ | |
public function sampleFunction($a, $b = null) | |
{ | |
if ($a === $b) { | |
bar(); | |
} elseif ($a > $b) { | |
$foo->bar($arg1); | |
} else { | |
BazClass::bar($arg2, $arg3); | |
} | |
} | |
final public static function bar() | |
{ | |
// method body | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment