Skip to content

Commit 73dd304

Browse files
authored
feat: type return values classmap (#24)
1 parent 2b59ffd commit 73dd304

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/ClassMap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function getAmbiguousClasses($duplicatesFilter = '{/(test|fixture|example
9494

9595
$ambiguousClasses = [];
9696
foreach ($this->ambiguousClasses as $class => $paths) {
97-
$paths = array_filter($paths, function ($path) use ($duplicatesFilter) {
97+
$paths = array_filter($paths, function ($path) use ($duplicatesFilter): bool {
9898
return !Preg::isMatch($duplicatesFilter, strtr($path, '\\', '/'));
9999
});
100100
if (\count($paths) > 0) {

src/ClassMapGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ private function filterByNamespace(array $classes, string $filePath, string $bas
280280
* @param string $path
281281
* @return bool
282282
*/
283-
private static function isAbsolutePath(string $path)
283+
private static function isAbsolutePath(string $path): bool
284284
{
285285
return strpos($path, '/') === 0 || substr($path, 1, 1) === ':' || strpos($path, '\\\\') === 0;
286286
}
@@ -294,7 +294,7 @@ private static function isAbsolutePath(string $path)
294294
* @param string $path Path to the file or directory
295295
* @return string
296296
*/
297-
private static function normalizePath(string $path)
297+
private static function normalizePath(string $path): string
298298
{
299299
$parts = [];
300300
$path = strtr($path, '\\', '/');

0 commit comments

Comments
 (0)