Skip to content

Commit 50dde41

Browse files
committed
Make condition more specific
1 parent 31fa5e0 commit 50dde41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Rules/Keywords/RequireFileExistsRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@ private function resolveFilePath(Include_ $node, Scope $scope): ?string
6262
$type = $scope->getType($node->expr);
6363
$paths = $type->getConstantStrings();
6464

65-
return $paths ? $paths[0]->getValue() : null;
65+
return isset($paths[0]) ? $paths[0]->getValue() : null;
6666
}
6767
}

0 commit comments

Comments
 (0)