From 9bac11d6ac18bc3a082a3bdb7293dec48335c56f Mon Sep 17 00:00:00 2001 From: Lucas Michot Date: Thu, 27 Jul 2017 10:51:55 +0200 Subject: [PATCH] Fix some docblocks --- src/AutoScaler.php | 25 ++++++++++--------- .../AddSupervisor.php | 10 ++++---- src/Notifications/LongWaitDetected.php | 4 +-- src/Repositories/RedisJobRepository.php | 2 +- .../RedisMasterSupervisorRepository.php | 4 +-- src/Repositories/RedisMetricsRepository.php | 8 +++--- src/Repositories/RedisProcessRepository.php | 6 ++--- .../RedisSupervisorRepository.php | 8 +++--- src/Repositories/RedisTagRepository.php | 6 ++--- src/Repositories/RedisWorkloadRepository.php | 16 ++++++------ src/SupervisorCommands/Balance.php | 2 +- src/SupervisorCommands/ContinueWorking.php | 2 +- src/SupervisorCommands/Pause.php | 2 +- src/SupervisorCommands/Restart.php | 2 +- src/SupervisorCommands/Scale.php | 2 +- src/SupervisorCommands/Terminate.php | 2 +- 16 files changed, 51 insertions(+), 50 deletions(-) diff --git a/src/AutoScaler.php b/src/AutoScaler.php index 7330b9b6..96877d88 100644 --- a/src/AutoScaler.php +++ b/src/AutoScaler.php @@ -11,22 +11,22 @@ class AutoScaler /** * The queue factory implementation. * - * @var QueueFactory + * @var \Illuminate\Contracts\Queue\Factory */ public $queue; /** * The metrics repository implementation. * - * @var MetricsRepository + * @var \Laravel\Horizon\Contracts\MetricsRepository */ public $metrics; /** * Create a new auto-scaler instance. * - * @param QueueFactory $queue - * @param MetricsRepository $metrics + * @param \Illuminate\Contracts\Queue\Factory $queue + * @param \Laravel\Horizon\Contracts\MetricsRepository $metrics * @return void */ public function __construct(QueueFactory $queue, MetricsRepository $metrics) @@ -38,7 +38,7 @@ public function __construct(QueueFactory $queue, MetricsRepository $metrics) /** * Balance the workers on the given supervisor. * - * @param Supervisor $supervisor + * @param \Laravel\Horizon\Supervisor $supervisor * @return void */ public function scale(Supervisor $supervisor) @@ -57,7 +57,7 @@ public function scale(Supervisor $supervisor) /** * Get the process pools keyed by their queue name. * - * @param Supervisor $supervisor + * @param \Laravel\Horizon\Supervisor $supervisor * @return Collection */ protected function poolsByQueue(Supervisor $supervisor) @@ -70,7 +70,7 @@ protected function poolsByQueue(Supervisor $supervisor) /** * Get the times in milliseconds needed to clear the queues. * - * @param Supervisor $supervisor + * @param \Laravel\Horizon\Supervisor $supervisor * @param Collection $pools * @return Collection */ @@ -86,8 +86,9 @@ protected function timeToClearPerQueue(Supervisor $supervisor, Collection $pools /** * Get the number of workers needed per queue for proper balance. * - * @param Supervisor $supervisor - * @param Collection $timeToClear + * @param \Laravel\Horizon\Supervisor $supervisor + * @param \Illuminate\Support\Collection $timeToClear + * @return \Illuminate\Support\Collection */ protected function numberOfWorkersPerQueue(Supervisor $supervisor, Collection $timeToClear) { @@ -103,8 +104,8 @@ protected function numberOfWorkersPerQueue(Supervisor $supervisor, Collection $t /** * Scale the given pool to the recommended number of workers. * - * @param Supervisor $supervisor - * @param ProcessPool $pool + * @param \Laravel\Horizon\Supervisor $supervisor + * @param \Laravel\Horizon\ProcessPool $pool * @param float $workers * @return void */ @@ -128,7 +129,7 @@ protected function scalePool(Supervisor $supervisor, $pool, $workers) /** * Determine if adding another process would exceed max process limit. * - * @param Supervisor $supervisor + * @param \Laravel\Horizon\Supervisor $supervisor * @param int $totalProcesses * @return bool */ diff --git a/src/MasterSupervisorCommands/AddSupervisor.php b/src/MasterSupervisorCommands/AddSupervisor.php index ffa3bf97..6806f2be 100644 --- a/src/MasterSupervisorCommands/AddSupervisor.php +++ b/src/MasterSupervisorCommands/AddSupervisor.php @@ -12,8 +12,8 @@ class AddSupervisor /** * Process the command. * - * @param MasterSupervisor $supervisor - * @param array $options + * @param \Laravel\Horizon\MasterSupervisor $master + * @param array $options * @return void */ public function process(MasterSupervisor $master, array $options) @@ -30,9 +30,9 @@ public function process(MasterSupervisor $master, array $options) /** * Create the Symfony process instance. * - * @param MasterSupervisor $supervisor - * @param SupervisorOptions $options - * @return Process + * @param \Laravel\Horizon\MasterSupervisor $master + * @param \Laravel\Horizon\SupervisorOptions $options + * @return $this */ protected function createProcess(MasterSupervisor $master, SupervisorOptions $options) { diff --git a/src/Notifications/LongWaitDetected.php b/src/Notifications/LongWaitDetected.php index 07841f2a..70abe494 100644 --- a/src/Notifications/LongWaitDetected.php +++ b/src/Notifications/LongWaitDetected.php @@ -66,7 +66,7 @@ public function via($notifiable) * Get the Slack representation of the notification. * * @param mixed $notifiable - * @return SlackMessage + * @return \Illuminate\Notifications\Messages\SlackMessage */ public function toSlack($notifiable) { @@ -88,7 +88,7 @@ public function toSlack($notifiable) * Get the Nexmo / SMS representation of the notification. * * @param mixed $notifiable - * @return NexmoMessage + * @return \Illuminate\Notifications\Messages\NexmoMessage */ public function toNexmo($notifiable) { diff --git a/src/Repositories/RedisJobRepository.php b/src/Repositories/RedisJobRepository.php index be8e1cdd..22f4b839 100644 --- a/src/Repositories/RedisJobRepository.php +++ b/src/Repositories/RedisJobRepository.php @@ -151,7 +151,7 @@ protected function countJobsByType($type) * Retrieve the jobs with the given IDs. * * @param array $ids - * @param string $indexFrom + * @param int $indexFrom * @return \Illuminate\Support\Collection */ public function getJobs(array $ids, $indexFrom = 0) diff --git a/src/Repositories/RedisMasterSupervisorRepository.php b/src/Repositories/RedisMasterSupervisorRepository.php index eb607435..c478e614 100644 --- a/src/Repositories/RedisMasterSupervisorRepository.php +++ b/src/Repositories/RedisMasterSupervisorRepository.php @@ -88,7 +88,7 @@ public function get(array $names) /** * Update the information about the given master supervisor. * - * @param MasterSupervisor $master + * @param \Laravel\Horizon\MasterSupervisor $master * @return void */ public function update(MasterSupervisor $master) @@ -130,7 +130,7 @@ public function forget($name) /** * Get the Redis connection instance. * - * @return \Illuminate\Redis\Connetions\Connection + * @return \Illuminate\Redis\Connections\Connection */ protected function connection() { diff --git a/src/Repositories/RedisMetricsRepository.php b/src/Repositories/RedisMetricsRepository.php index 2f37efcf..d287854f 100644 --- a/src/Repositories/RedisMetricsRepository.php +++ b/src/Repositories/RedisMetricsRepository.php @@ -14,14 +14,14 @@ class RedisMetricsRepository implements MetricsRepository /** * The Redis connection instance. * - * @var RedisFactory + * @var \Illuminate\Contracts\Redis\Factory */ public $redis; /** * Create a new repository instance. * - * @param RedisFactory $redis + * @param \Illuminate\Contracts\Redis\Factory $redis * @return void */ public function __construct(RedisFactory $redis) @@ -363,7 +363,7 @@ protected function storeSnapshotTimestamp() } /** - * Attempt to aquire a lock to monitor the queue wait times. + * Attempt to acquire a lock to monitor the queue wait times. * * @return bool */ @@ -386,7 +386,7 @@ public function forget($key) /** * Get the Redis connection instance. * - * @return \Illuminate\Redis\Connetions\Connection + * @return \Illuminate\Redis\Connections\Connection */ public function connection() { diff --git a/src/Repositories/RedisProcessRepository.php b/src/Repositories/RedisProcessRepository.php index 94d96ded..6193a84b 100644 --- a/src/Repositories/RedisProcessRepository.php +++ b/src/Repositories/RedisProcessRepository.php @@ -11,14 +11,14 @@ class RedisProcessRepository implements ProcessRepository /** * The Redis connection instance. * - * @var RedisFactory + * @var \Illuminate\Contracts\Redis\Factory */ public $redis; /** * Create a new repository instance. * - * @param RedisFactory $redis + * @param \Illuminate\Contracts\Redis\Factory $redis * @return void */ public function __construct(RedisFactory $redis) @@ -98,7 +98,7 @@ public function forgetOrphans($master, array $processIds) /** * Get the Redis connection instance. * - * @return \Illuminate\Redis\Connetions\Connection + * @return \Illuminate\Redis\Connections\Connection */ protected function connection() { diff --git a/src/Repositories/RedisSupervisorRepository.php b/src/Repositories/RedisSupervisorRepository.php index c6eb7b6c..475c5156 100644 --- a/src/Repositories/RedisSupervisorRepository.php +++ b/src/Repositories/RedisSupervisorRepository.php @@ -12,14 +12,14 @@ class RedisSupervisorRepository implements SupervisorRepository /** * The Redis connection instance. * - * @var RedisFactory + * @var \Illuminate\Contracts\Redis\Factory */ public $redis; /** * Create a new repository instance. * - * @param RedisFactory $redis + * @param \Illuminate\Contracts\Redis\Factory $redis * @return void */ public function __construct(RedisFactory $redis) @@ -101,7 +101,7 @@ public function longestActiveTimeout() /** * Update the information about the given supervisor process. * - * @param Supervisor $supervisor + * @param \Laravel\Horizon\Supervisor $supervisor * @return void */ public function update(Supervisor $supervisor) @@ -128,7 +128,7 @@ public function update(Supervisor $supervisor) /** * Remove the supervisor information from storage. * - * @param array|string $name + * @param array|string $names * @return void */ public function forget($names) diff --git a/src/Repositories/RedisTagRepository.php b/src/Repositories/RedisTagRepository.php index 26b3fe5d..7650bd6d 100644 --- a/src/Repositories/RedisTagRepository.php +++ b/src/Repositories/RedisTagRepository.php @@ -10,14 +10,14 @@ class RedisTagRepository implements TagRepository /** * The Redis connection instance. * - * @var RedisFactory + * @var \Illuminate\Contracts\Redis\Factory */ public $redis; /** * Create a new repository instance. * - * @param RedisFactory $redis + * @param \Illuminate\Contracts\Redis\Factory $redis * @return void */ public function __construct(RedisFactory $redis) @@ -175,7 +175,7 @@ public function forget($tag) /** * Get the Redis connection instance. * - * @return \Illuminate\Redis\Connetions\Connection + * @return \Illuminate\Redis\Connections\Connection */ protected function connection() { diff --git a/src/Repositories/RedisWorkloadRepository.php b/src/Repositories/RedisWorkloadRepository.php index 1b0ac859..4fab7328 100644 --- a/src/Repositories/RedisWorkloadRepository.php +++ b/src/Repositories/RedisWorkloadRepository.php @@ -13,38 +13,38 @@ class RedisWorkloadRepository implements WorkloadRepository /** * The queue factory implementation. * - * @var QueueFactory + * @var \Illuminate\Contracts\Queue\Factory */ public $queue; /** * The wait time calculator instance. * - * @var WaitTimeCalculator + * @var \Laravel\Horizon\WaitTimeCalculator */ public $waitTime; /** * The master supervisor repository implementation. * - * @var MasterSupervisorRepository + * @var \Laravel\Horizon\Contracts\MasterSupervisorRepository */ private $masters; /** * The supervisor repository implementation. * - * @var SupervisorRepository + * @var \Laravel\Horizon\Contracts\SupervisorRepository */ private $supervisors; /** * Create a new repository instance. * - * @param QueueFactory $queue - * @param WaitTimeCalculator $waitTime - * @param MasterSupervisorRepository $masters - * @param SupervisorRepository $supervisors + * @param \Illuminate\Contracts\Queue\Factory $queue + * @param \Laravel\Horizon\WaitTimeCalculator $waitTime + * @param \Laravel\Horizon\Contracts\MasterSupervisorRepository $masters + * @param \Laravel\Horizon\Contracts\SupervisorRepository $supervisors * @return void */ public function __construct(QueueFactory $queue, WaitTimeCalculator $waitTime, diff --git a/src/SupervisorCommands/Balance.php b/src/SupervisorCommands/Balance.php index a7092dcb..075e5987 100644 --- a/src/SupervisorCommands/Balance.php +++ b/src/SupervisorCommands/Balance.php @@ -9,7 +9,7 @@ class Balance /** * Process the command. * - * @param Supervisor $supervisor + * @param \Laravel\Horizon\Supervisor $supervisor * @param array $options * @return void */ diff --git a/src/SupervisorCommands/ContinueWorking.php b/src/SupervisorCommands/ContinueWorking.php index 2be0d3ee..a90790e0 100644 --- a/src/SupervisorCommands/ContinueWorking.php +++ b/src/SupervisorCommands/ContinueWorking.php @@ -9,7 +9,7 @@ class ContinueWorking /** * Process the command. * - * @param Pausable $pausable + * @param \Laravel\Horizon\Contracts\Pausable $pausable * @return void */ public function process(Pausable $pausable) diff --git a/src/SupervisorCommands/Pause.php b/src/SupervisorCommands/Pause.php index e59096f7..c065f56a 100644 --- a/src/SupervisorCommands/Pause.php +++ b/src/SupervisorCommands/Pause.php @@ -9,7 +9,7 @@ class Pause /** * Process the command. * - * @param Pausable $pausable + * @param \Laravel\Horizon\Contracts\Pausable $pausable * @return void */ public function process(Pausable $pausable) diff --git a/src/SupervisorCommands/Restart.php b/src/SupervisorCommands/Restart.php index b5cc9fe5..80591b3a 100644 --- a/src/SupervisorCommands/Restart.php +++ b/src/SupervisorCommands/Restart.php @@ -9,7 +9,7 @@ class Restart /** * Process the command. * - * @param Restartable $restartable + * @param \Laravel\Horizon\Contracts\Restartable $restartable * @return void */ public function process(Restartable $restartable) diff --git a/src/SupervisorCommands/Scale.php b/src/SupervisorCommands/Scale.php index 000d16ba..c51a348b 100644 --- a/src/SupervisorCommands/Scale.php +++ b/src/SupervisorCommands/Scale.php @@ -9,7 +9,7 @@ class Scale /** * Process the command. * - * @param Supervisor $supervisor + * @param \Laravel\Horizon\Supervisor $supervisor * @param array $options * @return void */ diff --git a/src/SupervisorCommands/Terminate.php b/src/SupervisorCommands/Terminate.php index 836f87da..7141b9bf 100644 --- a/src/SupervisorCommands/Terminate.php +++ b/src/SupervisorCommands/Terminate.php @@ -9,7 +9,7 @@ class Terminate /** * Process the command. * - * @param Terminable $terminable + * @param \Laravel\Horizon\Contracts\Terminable $terminable * @param array $options * @return void */