@@ -88,7 +88,7 @@ public function sort(): void
88
88
*/
89
89
public function addClass (string $ className , string $ path ): void
90
90
{
91
- unset($ this ->psrViolations [strtr ('\\' , '/ ' , $ path )]);
91
+ unset($ this ->psrViolations [strtr ($ path , '\\' , '/ ' )]);
92
92
93
93
$ this ->map [$ className ] = $ path ;
94
94
}
@@ -116,14 +116,14 @@ public function hasClass(string $className): bool
116
116
117
117
public function addPsrViolation (string $ warning , string $ className , string $ path ): void
118
118
{
119
- $ path = rtrim (strtr ('\\' , '/ ' , $ path ), '/ ' );
119
+ $ path = rtrim (strtr ($ path , '\\' , '/ ' ), '/ ' );
120
120
121
121
$ this ->psrViolations [$ path ][] = ['warning ' => $ warning , 'className ' => $ className ];
122
122
}
123
123
124
124
public function clearPsrViolationsByPath (string $ pathPrefix ): void
125
125
{
126
- $ pathPrefix = rtrim (strtr ('\\' , '/ ' , $ pathPrefix ), '/ ' );
126
+ $ pathPrefix = rtrim (strtr ($ pathPrefix , '\\' , '/ ' ), '/ ' );
127
127
128
128
foreach ($ this ->psrViolations as $ path => $ violations ) {
129
129
if ($ path === $ pathPrefix || 0 === \strpos ($ path , $ pathPrefix .'/ ' )) {
0 commit comments