diff --git a/src/Schedule/Extension/NotifierExtension.php b/src/Schedule/Extension/NotifierExtension.php index 68ddb14..d20893c 100644 --- a/src/Schedule/Extension/NotifierExtension.php +++ b/src/Schedule/Extension/NotifierExtension.php @@ -30,10 +30,10 @@ final class NotifierExtension implements HasMissingDependencyMessage /** @var Notification */ private $notification; - /** @var Schedule\Extension\string|null */ + /** @var string|null */ private $email; - /** @var Schedule\Extension\string|null */ + /** @var string|null */ private $phone; /** diff --git a/src/Schedule/ScheduleRunContext.php b/src/Schedule/ScheduleRunContext.php index 6f7e12a..5069d33 100644 --- a/src/Schedule/ScheduleRunContext.php +++ b/src/Schedule/ScheduleRunContext.php @@ -19,7 +19,7 @@ /** * @author Kevin Bond */ -final class ScheduleRunContext extends Schedule\RunContext +final class ScheduleRunContext extends RunContext { /** @var Schedule */ private $schedule; @@ -51,7 +51,7 @@ final class ScheduleRunContext extends Schedule\RunContext /** @var Result[]|null */ private $run; - public function __construct(Schedule $schedule, Schedule\Task ...$forcedTasks) + public function __construct(Schedule $schedule, Task ...$forcedTasks) { parent::__construct(); diff --git a/src/Schedule/ScheduleRunner.php b/src/Schedule/ScheduleRunner.php index 0568584..ae6b927 100644 --- a/src/Schedule/ScheduleRunner.php +++ b/src/Schedule/ScheduleRunner.php @@ -53,7 +53,7 @@ public function __construct(iterable $taskRunners, ExtensionHandlerRegistry $han /** * @param string ...$taskIds Task ID's to force run */ - public function __invoke(string ...$taskIds): Schedule\ScheduleRunContext + public function __invoke(string ...$taskIds): ScheduleRunContext { $scheduleRunContext = $this->createRunContext($taskIds); @@ -99,7 +99,7 @@ public function buildSchedule(): Schedule return $schedule; } - public function runnerFor(Schedule\Task $task): TaskRunner + public function runnerFor(Task $task): TaskRunner { foreach ($this->taskRunners as $runner) { if ($runner->supports($task)) { @@ -137,12 +137,12 @@ private function postRun(TaskRunContext $context): void /** * @param string[] $taskIds */ - private function createRunContext(array $taskIds): Schedule\ScheduleRunContext + private function createRunContext(array $taskIds): ScheduleRunContext { $schedule = $this->buildSchedule(); $tasks = \array_map(fn(string $id) => $schedule->getTask($id), $taskIds); - return new Schedule\ScheduleRunContext($schedule, ...$tasks); + return new ScheduleRunContext($schedule, ...$tasks); } } diff --git a/src/Schedule/Task/CompoundTask.php b/src/Schedule/Task/CompoundTask.php index 4ccaab3..986f93c 100644 --- a/src/Schedule/Task/CompoundTask.php +++ b/src/Schedule/Task/CompoundTask.php @@ -44,53 +44,53 @@ public function add(Task $task): self /** * @see CommandTask::__construct() * - * @param Task\string|null $description optional description + * @param string|null $description optional description */ public function addCommand(string $name, array $arguments = [], ?string $description = null): self { - return $this->addWithDescription(new Task\CommandTask($name, ...$arguments), $description); + return $this->addWithDescription(new CommandTask($name, ...$arguments), $description); } /** * @see CallbackTask::__construct() * - * @param Task\string|null $description optional description + * @param string|null $description optional description */ public function addCallback(callable $callback, ?string $description = null): self { - return $this->addWithDescription(new Task\CallbackTask($callback), $description); + return $this->addWithDescription(new CallbackTask($callback), $description); } /** * @see ProcessTask::__construct() * - * @param string|Process $process - * @param Task\string|null $description optional description + * @param string|Process $process + * @param string|null $description optional description */ public function addProcess($process, ?string $description = null): self { - return $this->addWithDescription(new Task\ProcessTask($process), $description); + return $this->addWithDescription(new ProcessTask($process), $description); } /** * @see PingTask::__construct() * - * @param Task\string|null $description optional description + * @param string|null $description optional description */ public function addPing(string $url, string $method = 'GET', array $options = [], ?string $description = null): self { - return $this->addWithDescription(new Task\PingTask($url, $method, $options), $description); + return $this->addWithDescription(new PingTask($url, $method, $options), $description); } /** * @see MessageTask::__construct() * - * @param object|Envelope $message - * @param Task\string|null $description optional description + * @param object|Envelope $message + * @param string|null $description optional description */ public function addMessage(object $message, array $stamps = [], ?string $description = null): self { - return $this->addWithDescription(new Task\MessageTask($message, $stamps), $description); + return $this->addWithDescription(new MessageTask($message, $stamps), $description); } /** diff --git a/src/Schedule/Task/Result.php b/src/Schedule/Task/Result.php index 2865512..35d122e 100644 --- a/src/Schedule/Task/Result.php +++ b/src/Schedule/Task/Result.php @@ -31,7 +31,7 @@ final class Result /** @var string */ private $description; - /** @var Task\string|null */ + /** @var string|null */ private $output; /** @var \Throwable|null */ diff --git a/src/Schedule/Task/Runner/CommandTaskRunner.php b/src/Schedule/Task/Runner/CommandTaskRunner.php index 0c7837d..e7f4d68 100644 --- a/src/Schedule/Task/Runner/CommandTaskRunner.php +++ b/src/Schedule/Task/Runner/CommandTaskRunner.php @@ -37,7 +37,7 @@ public function __construct(Application $application) */ public function __invoke(Task $task): Result { - $shellVerbosityResetter = new Task\Runner\ShellVerbosityResetter(); + $shellVerbosityResetter = new ShellVerbosityResetter(); $output = new BufferedOutput(); $this->application->setCatchExceptions(false); $this->application->setAutoExit(false); diff --git a/src/Schedule/Task/TaskRunContext.php b/src/Schedule/Task/TaskRunContext.php index 7a3fdc0..2c4e357 100644 --- a/src/Schedule/Task/TaskRunContext.php +++ b/src/Schedule/Task/TaskRunContext.php @@ -26,7 +26,7 @@ final class TaskRunContext extends RunContext /** @var Task */ private $task; - /** @var Task\Result */ + /** @var Result */ private $result; public function __construct(ScheduleRunContext $scheduleRunContext, Task $task) @@ -55,14 +55,14 @@ public function getTask(): Task /** * @throws \LogicException if has not yet run */ - public function getResult(): Task\Result + public function getResult(): Result { $this->ensureHasRun(); return $this->result; } - public function setResult(Task\Result $result): void + public function setResult(Result $result): void { $resultTask = $result->getTask(); diff --git a/src/Schedule/Task/TaskRunner.php b/src/Schedule/Task/TaskRunner.php index 0b228d5..d261bb3 100644 --- a/src/Schedule/Task/TaskRunner.php +++ b/src/Schedule/Task/TaskRunner.php @@ -18,7 +18,7 @@ */ interface TaskRunner { - public function __invoke(Task $task): Task\Result; + public function __invoke(Task $task): Result; public function supports(Task $task): bool; }