Skip to content

Commit f7f8c65

Browse files
Girgiasnicolas-grekas
authored andcommitted
Remove some implicit bool type juggling
1 parent da888ef commit f7f8c65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ExecutableFinder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ public function find(string $name, ?string $default = null, array $extraDirs = [
6363
}
6464

6565
$dirs = array_merge(
66-
explode(\PATH_SEPARATOR, getenv('PATH') ?: getenv('Path')),
66+
explode(\PATH_SEPARATOR, getenv('PATH') ?: getenv('Path') ?: ''),
6767
$extraDirs
6868
);
6969

7070
$suffixes = $this->suffixes;
7171
if ('\\' === \DIRECTORY_SEPARATOR) {
72-
$pathExt = getenv('PATHEXT');
72+
$pathExt = getenv('PATHEXT') ?: '';
7373
$suffixes = array_merge($suffixes, $pathExt ? explode(\PATH_SEPARATOR, $pathExt) : ['.exe', '.bat', '.cmd', '.com']);
7474
}
7575
$suffixes = '' !== pathinfo($name, \PATHINFO_EXTENSION) ? array_merge([''], $suffixes) : array_merge($suffixes, ['']);

0 commit comments

Comments
 (0)