@@ -59,7 +59,7 @@ public function process(File $file, $position)
5959 }
6060
6161 $ this ->exclude = is_array ($ this ->exclude ) ? $ this ->normalizeExcluded ($ this ->exclude ) : [];
62- $ this ->checkPsr4 ($ file , $ position , $ entityType , $ className );
62+ $ this ->checkPsr4 ($ file , $ position , $ className , $ entityType );
6363 }
6464
6565 /**
@@ -94,22 +94,21 @@ private function checkFilenameOnly(
9494 /**
9595 * @param File $file
9696 * @param int $position
97- * @param string $entityType
9897 * @param string $className
99- * @return bool
98+ * @param string $entityType
10099 */
101100 private function checkPsr4 (
102101 File $ file ,
103102 int $ position ,
104- string $ entityType ,
105- string $ className
103+ string $ className ,
104+ string $ entityType
106105 ) {
107106
108107 list (, $ namespace ) = PhpcsHelpers::findNamespace ($ file , $ position );
109108
110109 $ fullyQualifiedName = "{$ namespace }\\{$ className }" ;
111110 if (in_array ($ fullyQualifiedName , $ this ->exclude , true )) {
112- return true ;
111+ return ;
113112 }
114113
115114 $ filePath = str_replace ('\\' , '/ ' , $ file ->getFilename ());
@@ -137,7 +136,7 @@ private function checkPsr4(
137136 : "{$ baseNamespace }\\{$ relativeNamespace }" ;
138137
139138 if ("{$ expectedNamespace }\\{$ className }" === "{$ namespace }\\{$ className }" ) {
140- return true ;
139+ return ;
141140 }
142141 }
143142
@@ -151,8 +150,6 @@ private function checkPsr4(
151150 $ position ,
152151 'InvalidPSR4 '
153152 );
154-
155- return false ;
156153 }
157154
158155 /**
0 commit comments