Remove some implicit bool type juggling

This commit is contained in:
Gina Peter Banyard
2025-06-24 13:39:09 +01:00
committed by Nicolas Grekas
parent da888ef618
commit f7f8c65270

View File

@@ -63,13 +63,13 @@ class ExecutableFinder
}
$dirs = array_merge(
explode(\PATH_SEPARATOR, getenv('PATH') ?: getenv('Path')),
explode(\PATH_SEPARATOR, getenv('PATH') ?: getenv('Path') ?: ''),
$extraDirs
);
$suffixes = $this->suffixes;
if ('\\' === \DIRECTORY_SEPARATOR) {
$pathExt = getenv('PATHEXT');
$pathExt = getenv('PATHEXT') ?: '';
$suffixes = array_merge($suffixes, $pathExt ? explode(\PATH_SEPARATOR, $pathExt) : ['.exe', '.bat', '.cmd', '.com']);
}
$suffixes = '' !== pathinfo($name, \PATHINFO_EXTENSION) ? array_merge([''], $suffixes) : array_merge($suffixes, ['']);