You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So if there is something on same line as class/interface close brace then it's being detected already.
Here are the errors reported on last line of fixture file:
Closing brace of a class must be followed by a single blank line (....Classes.ClassDeclaration.NoNewlineAfterCloseBrace)
Closing class brace must be on a line by itself (....Classes.ClassDeclaration.CloseBraceSameLine)
The text was updated successfully, but these errors were encountered:
Digging a bit deeper I think 2 mentioned code pieces needs to be united. So basically in code that reports error when new line isn't present after class closing brace we should made an exclusion that allow for comment to be present on same line after class closing brace. If present, then we should look for empty line after that comment (but since it's on same line we can also look for empty line just ignoring comments on same line).
What I trying to achieve here is to reduce duplicate fixing code, that adds new lines otherwise. Because right now class closing brace will be separated from it's comment anyway during fixing process. See how I did that: aik099/CodingStandard@da60ac3
The check made in https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Classes/ClassDeclarationSniff.php#L162-L170 is covered at 100% in above lines https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Classes/ClassDeclarationSniff.php#L136-L160 in same class.
So if there is something on same line as class/interface close brace then it's being detected already.
Here are the errors reported on last line of fixture file:
The text was updated successfully, but these errors were encountered: