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

PSR2.Classes.ClassDeclaration allows extended class on new line #2298

Closed
michalbundyra opened this issue Dec 8, 2018 · 0 comments
Closed
Milestone

Comments

@michalbundyra
Copy link
Contributor

<?php

class X extends
 Foo
{
}

the code is valid, but I think it shouldn't. "Foo" should be in the same line as extends.

If we have two spaces before "Foo" then we getting error:

[x] Expected 1 space before "Foo"; 2 found (PSR2.Classes.ClassDeclaration.SpaceBeforeName)
michalbundyra added a commit to michalbundyra/Squizlabs_PHP_CodeSniffer that referenced this issue Dec 9, 2018
We require just one space before parent class name (after extends keyword).

Fixes squizlabs#2298
@gsherwood gsherwood added this to the 3.4.0 milestone Dec 10, 2018
@gsherwood gsherwood modified the milestones: 3.4.0, 3.4.1 Dec 10, 2018
@gsherwood gsherwood removed this from the 3.4.1 milestone Dec 20, 2018
@gsherwood gsherwood changed the title PSR2.Classes.ClassDeclaration - one space before name PSR2.Classes.ClassDeclaration allows extended class on new line Feb 28, 2019
@gsherwood gsherwood added this to the 3.4.1 milestone Feb 28, 2019
gsherwood added a commit that referenced this issue Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants