Skip to content

Commit 61d1b7d

Browse files
committed
add string param typehint;
null check is redundant;
1 parent a2d974a commit 61d1b7d

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/phpDocumentor/Reflection/Php/ProjectFactory.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,22 +65,17 @@ public static function createInstance(): self
6565
/**
6666
* Creates a project from the set of files.
6767
*
68-
* @param string $name
69-
*
7068
* @param File[] $files
71-
* @return ProjectInterface
7269
* @throws Exception when no matching strategy was found.
7370
*/
74-
public function create($name, array $files): ProjectInterface
71+
public function create(string $name, array $files): ProjectInterface
7572
{
7673
$project = new Project($name);
7774

7875
foreach ($files as $filePath) {
7976
$strategy = $this->strategies->findMatching($filePath);
8077
$file = $strategy->create($filePath, $this->strategies);
81-
if ($file !== null) {
82-
$project->addFile($file);
83-
}
78+
$project->addFile($file);
8479
}
8580

8681
$this->buildNamespaces($project);

0 commit comments

Comments
 (0)