Skip to content

Instantly share code, notes, and snippets.

@marcioAlmada
Last active February 29, 2016 04:36
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 marcioAlmada/75f8f1d47da5dcac2e57 to your computer and use it in GitHub Desktop.
Save marcioAlmada/75f8f1d47da5dcac2e57 to your computer and use it in GitHub Desktop.
<?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
Copy link

SammyK commented Oct 22, 2015

Probably should add implements lists:

class Foo implements
    FooInterface,
    BarInterface,
    BazInterface,
{
}

@SammyK
Copy link

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