Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
<?php
use Foo\Bar\{ Foo, Bar, Baz, }; // group use
$array = [1, 2, 3,]; // array
fooCall($arg1, $arg2, $arg3,); // function call arglist
class Foo { // class member lists
const
A = 1010,
B = 1021,
C = 1032,
D = 1043,
;
protected
$a = 'foo',
$b = 'bar',
$c = 'baz',
;
private
$blah,
;
// arglist declarations
function something(FooBarBazInterface $in, FooBarBazInterface $out,) : bool
{
}
}
// traits
class MyClass
{
use
FooTrait,
BarTrait,
BazTrait,
;
}
// implements
implements class Foo implements
FooInterface,
BarInterface,
BazInterface,
{
}

SammyK commented Oct 22, 2015

Probably should add implements lists:

class Foo implements
    FooInterface,
    BarInterface,
    BazInterface,
{
}

SammyK commented Oct 24, 2015

Oh! Also traits:

class MyClass
{
    use FooTrait,
           BarTrait,
           BazTrait,
    ;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment