Skip to content

Commit 4acc555

Browse files
committed
Make condition more clear
1 parent 2814cf8 commit 4acc555

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
@@ -41,7 +41,7 @@ public function processNode(Node $node, Scope $scope): array
4141
{
4242
if ($this->shouldProcessNode($node)) {
4343
$filePath = $this->resolveFilePath($node->expr, $scope);
44-
if ($filePath !== null && !file_exists($filePath)) {
44+
if (is_string($filePath) && !is_file($filePath)) {
4545
return [
4646
RuleErrorBuilder::message(
4747
sprintf(

0 commit comments

Comments
 (0)