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
If class contains no additional declarations (such as an exception that exists only to extend another exception with a new type), then the body of the class SHOULD be abbreviated as {} and placed on the same line as the previous symbol, separated by a space. For example:
class MyException extends \RuntimeException {}
Actual result
It outputs:
--------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------------
9 | WARNING | [x] Opening brace of a class must be on the line after the definition
| | (PSR2.Classes.ClassDeclaration.OpenBraceNewLine)
9 | WARNING | [x] Closing brace must be on a line by itself (Squiz.WhiteSpace.ScopeClosingBrace.ContentBefore)
--------------------------------------------------------------------------------------------------------------------------------------
Discussion
When you use php-cs-fixer with the PER-CS 2.0 ruleset, it conflicts with this Magento2 phpcs standard.
Not sure if this should be considered a bug in the M2 coding-standards, or more of a bug in phpcs itself?
The text was updated successfully, but these errors were encountered:
Hi @hostep. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this
Preconditions
Steps to reproduce
Expected result
Actual result
Discussion
When you use php-cs-fixer with the PER-CS 2.0 ruleset, it conflicts with this Magento2 phpcs standard.
Not sure if this should be considered a bug in the M2 coding-standards, or more of a bug in phpcs itself?
The text was updated successfully, but these errors were encountered: