Created
January 6, 2014 16:22
-
-
Save ckdarby/8285304 to your computer and use it in GitHub Desktop.
PSR2 Example
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
<?php | |
namespace Vendor\Package; | |
use FooInterface; | |
use BarClass as Bar; | |
use OtherVendor\OtherPackage\BazClass; | |
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