Skip to content

Commit

Permalink
fix(documentator): `\LastDragon_ru\LaraASP\Documentator\Processor\Tas…
Browse files Browse the repository at this point in the history
…ks\CodeLinks\Task` source file path resolution.

Origin: e3be7e0
  • Loading branch information
LastDragon-ru committed Nov 10, 2024
1 parent ade2e25 commit 42b2adf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/documentator/src/Processor/Tasks/CodeLinks/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,13 @@ public function __invoke(Directory $root, File $file): Generator {
if ($paths === null) {
continue;
}

// File?
$source = null;
$paths = is_array($paths) ? $paths : [$paths];

foreach ($paths as $path) {
$path = $root->getPath()->getPath($path);
$source = Cast::toNullable(File::class, yield new Optional(new FileReference($path)));

if ($source !== null) {
Expand Down

0 comments on commit 42b2adf

Please sign in to comment.