Skip to content

Commit 66de6ad

Browse files
committed
Adds null check for files
1 parent cb6ec76 commit 66de6ad

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/phpDocumentor/Reflection/Php/ProjectFactory.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,10 @@ public function create($name, array $files)
7676

7777
foreach ($files as $filePath) {
7878
$strategy = $this->strategies->findMatching($filePath);
79-
$project->addFile($strategy->create($filePath, $this->strategies));
79+
$file = $strategy->create($filePath, $this->strategies);
80+
if ($file !== null) {
81+
$project->addFile($file);
82+
}
8083
}
8184

8285
$this->buildNamespaces($project);

0 commit comments

Comments
 (0)