Skip to content

class and properties with no spaces between them seem to be allowed #236

Open
@greg0ire

Description

@greg0ire

While working on applying this standard on doctrine/orm, we found with @SenseException that the following will not raise any error:

// declarations
class Foo
{
    /** @var int */
    private $bar;
    /** @var int */
    private $baz;
}
class FooBar
{
}

We would expect errors about the lack of space between property declarations
and class declarations. Does anyone know of a sniff that we could integrate to
doctrine/coding-standard for this? @kukulich maybe?

Note that in PHP 7.4, I personally would be ok with a lack of space between property declarations when they fit on one line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions