Skip to content

Commit

Permalink
bot: fix cs [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
kbond committed Feb 1, 2024
1 parent fb41fe6 commit 8b951ca
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions src/Schedule/Extension/NotifierExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Schedule/ScheduleRunContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @author Kevin Bond <[email protected]>
*/
final class ScheduleRunContext extends Schedule\RunContext
final class ScheduleRunContext extends RunContext
{
/** @var Schedule */
private $schedule;
Expand Down Expand Up @@ -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();

Expand Down
8 changes: 4 additions & 4 deletions src/Schedule/ScheduleRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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);
}
}
24 changes: 12 additions & 12 deletions src/Schedule/Task/CompoundTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Schedule/Task/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ final class Result
/** @var string */
private $description;

/** @var Task\string|null */
/** @var string|null */
private $output;

/** @var \Throwable|null */
Expand Down
2 changes: 1 addition & 1 deletion src/Schedule/Task/Runner/CommandTaskRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions src/Schedule/Task/TaskRunContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion src/Schedule/Task/TaskRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 8b951ca

Please sign in to comment.