Skip to content

Instantly share code, notes, and snippets.

@bilalucar
Created February 20, 2017 08:41
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save bilalucar/ff63a6d060a74794e919c2d63c62ddb0 to your computer and use it in GitHub Desktop.
PSR-2
<?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