Skip to content

Commit

Permalink
fixup! Add exception handle for nonexistent directory
Browse files Browse the repository at this point in the history
  • Loading branch information
koriym committed Jun 2, 2024
1 parent 09acd9a commit 6e8a3cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/XmlConfigLoad.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ public function locateConfigFile(string $path): string
}

$dirPath = realpath($path) ?: getcwd();
if (! is_dir($dirPath)) {
if (! is_dir((string) $dirPath)) {
// @codeCoverageIgnoreStart
throw new DataFileNotFoundException($dirPath);
throw new DataFileNotFoundException($path);
// @codeCoverageIgnoreEnd
}

Expand Down

0 comments on commit 6e8a3cc

Please # to comment.