Skip to content

Revisit assignment alignment #15

@colinodell

Description

@colinodell

Currently, this coding standard requires that all consecutive assignments be vertically aligned by their operator:

$width  = 1900;
$height = 1080;
$foo                  = 'bar';
$someLongVariableName = 'baz';

While this is (subjectively) nice in the first example, it's a bit ugly in the second - it causes developers to either produce messier-looking code or to use less-meaningful names to avoid the extra spaces:

$foo  = 'bar';
$slvn = 'baz';

I therefore propose removing the enforcement of this rule from this standard.

The question I'd like to ask our users is whether this alignment should still be allowed not enforced. This would mean that all three examples above would be considered valid. Alternatively, we could enforce having exactly one space on each side of the operator.

Does anyone have a strong preference here?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions