Skip to content

Commit

Permalink
Merge branch 'master' into 5x-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
DerManoMann committed Jun 7, 2024
2 parents aeac9aa + 2d983ce commit 5c09f83
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public function getProcessorPipeline(): Pipeline
return $this->processorPipeline->walk($walker);
}

public function setProcessorPipeline(Pipeline $processor): Generator
public function setProcessorPipeline(?Pipeline $processor): Generator
{
$this->processorPipeline = $processor;

Expand Down Expand Up @@ -372,13 +372,15 @@ public static function scan(iterable $sources, array $options = []): ?OA\OpenApi
'version' => null,
];

$processorPipeline = $config['processor'] ??
$config['processors'] ? new Pipeline($config['processors']) : null;

return (new Generator($config['logger']))
->setVersion($config['version'])
->setAliases($config['aliases'])
->setNamespaces($config['namespaces'])
->setAnalyser($config['analyser'])
->setProcessorPipeline($config['processor'])
->setProcessorPipeline(new Pipeline($config['processors']))
->setProcessorPipeline($processorPipeline)
->generate($sources, $config['analysis'], $config['validate']);
}

Expand Down

0 comments on commit 5c09f83

Please sign in to comment.