Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
greg0ire opened this issue Feb 15, 2021 · 0 comments
Open

Comments

@greg0ire
Copy link
Member

greg0ire commented Feb 15, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant