@@ -59,7 +59,7 @@ public function process(File $file, $position)
59
59
}
60
60
61
61
$ this ->exclude = is_array ($ this ->exclude ) ? $ this ->normalizeExcluded ($ this ->exclude ) : [];
62
- $ this ->checkPsr4 ($ file , $ position , $ entityType , $ className );
62
+ $ this ->checkPsr4 ($ file , $ position , $ className , $ entityType );
63
63
}
64
64
65
65
/**
@@ -94,22 +94,21 @@ private function checkFilenameOnly(
94
94
/**
95
95
* @param File $file
96
96
* @param int $position
97
- * @param string $entityType
98
97
* @param string $className
99
- * @return bool
98
+ * @param string $entityType
100
99
*/
101
100
private function checkPsr4 (
102
101
File $ file ,
103
102
int $ position ,
104
- string $ entityType ,
105
- string $ className
103
+ string $ className ,
104
+ string $ entityType
106
105
) {
107
106
108
107
list (, $ namespace ) = PhpcsHelpers::findNamespace ($ file , $ position );
109
108
110
109
$ fullyQualifiedName = "{$ namespace }\\{$ className }" ;
111
110
if (in_array ($ fullyQualifiedName , $ this ->exclude , true )) {
112
- return true ;
111
+ return ;
113
112
}
114
113
115
114
$ filePath = str_replace ('\\' , '/ ' , $ file ->getFilename ());
@@ -137,7 +136,7 @@ private function checkPsr4(
137
136
: "{$ baseNamespace }\\{$ relativeNamespace }" ;
138
137
139
138
if ("{$ expectedNamespace }\\{$ className }" === "{$ namespace }\\{$ className }" ) {
140
- return true ;
139
+ return ;
141
140
}
142
141
}
143
142
@@ -151,8 +150,6 @@ private function checkPsr4(
151
150
$ position ,
152
151
'InvalidPSR4 '
153
152
);
154
-
155
- return false ;
156
153
}
157
154
158
155
/**
0 commit comments