-
Notifications
You must be signed in to change notification settings - Fork 12
Naming Conventions
These are the naming conventions for objects used by the php code formatter.
A block is everything between curly braces.
Entity: gossi\formatter\entities\Block
Abstract word that defines class
, trait
and interface
.
Which is either a function or method.
Everything between curly braces which is neither a Struct or Routine, something like loops, conditions, etc. (but also use blocks).
A group is everything between parens.
Entity: gossi\formatter\entities\Group
When a group belongs to a block, such as the conditions for an if-clause or a while statement.
Whenever a function or method is invocated, this will be the respective context
Example:
$foo->bar($baz);
Everything else, that is grouped within parens.
Example:
$a = $b * ($c + 5);
Units are collective statements of a specific type.
Entity: gossi\formatter\entities\Unit
Types: namespace
, use
, traits
, fields
, constants
, methods
, imports
Example:
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;