Skip to content

Commit ce13288

Browse files
committed
Don't return anything from Psr4Sniff::checkPsr4
1 parent 8c4273a commit ce13288

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

Inpsyde/Sniffs/CodeQuality/Psr4Sniff.php

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)