Skip to content

Commit 115c56d

Browse files
committed
Check for existing file
1 parent c0cc8b1 commit 115c56d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/phpDocumentor/Reflection/File/LocalFile.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ final class LocalFile implements File
3232
*/
3333
public function __construct(string $path)
3434
{
35+
if (!file_exists($path)) {
36+
throw new \InvalidArgumentException(sprintf('File "%s" does not exist', $path));
37+
}
3538
$this->path = $path;
3639
}
3740

0 commit comments

Comments
 (0)