Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PSR2/ClassDeclaration: prevent fixer conflict with itself [2]
While the `PSR2.Classes.ClassDeclaration` sniff did take partially/fully qualified names into account for interfaces being implemented, it did not take _namespace relative_ interface names into account. This led to a fixer conflict within the sniff, where the sniff would first add a newline between the `namespace` keyword and the namespace separator (`InterfaceSameLine` fixer) and in a subsequent loop would remove that same new line again as it would think it was a space before a comma (`SpaceBeforeComma` fixer). Fixed now by adding support for namespace relative interface names in the `implements` check. Includes unit test. Related to 152 Note: at a glance, this sniff could probably do with a more thorough review and more defensive token walking/more precise checking, but that's outside the scope of this PR.
- Loading branch information