Skip to content

Commit

Permalink
Narrow down base class type hints to implementation unions
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Oct 28, 2023
1 parent b2b9ae6 commit 7037a3f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function setOutput(?OutputStyle $output): void
$this->output = $output;
}

/** @return array<class-string<\Hyde\Framework\Features\BuildTasks\BuildTask>> */
/** @return array<class-string<\Hyde\Framework\Features\BuildTasks\PreBuildTask>|class-string<\Hyde\Framework\Features\BuildTasks\PostBuildTask>> */
public function getRegisteredTasks(): array
{
return array_map(fn (BuildTask $task): string => $task::class, array_values($this->buildTasks));
Expand Down Expand Up @@ -103,13 +103,13 @@ protected function registerTasks(array $tasks): void
}
}

/** @return array<class-string<\Hyde\Framework\Features\BuildTasks\BuildTask>> */
/** @return array<class-string<\Hyde\Framework\Features\BuildTasks\PreBuildTask>|class-string<\Hyde\Framework\Features\BuildTasks\PostBuildTask>> */
protected function findTasksInConfig(): array
{
return Config::getArray('hyde.build_tasks', []);
}

/** @return array<class-string<\Hyde\Framework\Features\BuildTasks\BuildTask>> */
/** @return array<class-string<\Hyde\Framework\Features\BuildTasks\PreBuildTask>|class-string<\Hyde\Framework\Features\BuildTasks\PostBuildTask>> */
protected function findTasksInAppDirectory(): array
{
return Filesystem::smartGlob('app/Actions/*BuildTask.php')->map(function (string $file): string {
Expand Down

0 comments on commit 7037a3f

Please sign in to comment.