Member Var Spacing

There should be exactly one blank line before the first property (member variable).

Valid: One blank line before the first property.

class MyClass {<em>

</em> protected $var1 = 'value'; }

Invalid: Incorrect number of blank lines before the first property.

class MyClass {<em> </em> protected $var1 = 'value'; }
There should be exactly one blank line between properties.

Valid: One blank line between each property.

trait MyTrait {

public $var1 = 'value';<em>

</em> public $var2 = 'value2';<em>

</em> public $var3 = 'value3'; }

Invalid: Incorrect number of blank lines between each property.

trait MyTrait {

public $var1 = 'value';<em>

</em> public $var2 = 'value2';<em> </em> public $var3 = 'value3'; }
There should be no blank lines between a property DocBlock and the property declaration the DocBlock applies to.

Valid: No blank lines between DocBlock and its property.

$anon = new class {

/** * The actions that this class can perform. * * @var array */<em> </em> public $actions = array(); };

Invalid: Blank line(s) between DocBlock and its property.

$anon = new class {

/** * The actions that this class can perform. * * @var array */<em>

</em> public $actions = array(); };