Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some docblocks #37

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions src/AutoScaler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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
*/
Expand All @@ -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)
{
Expand All @@ -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
*/
Expand All @@ -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
*/
Expand Down
10 changes: 5 additions & 5 deletions src/MasterSupervisorCommands/AddSupervisor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Notifications/LongWaitDetected.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Repositories/RedisJobRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/Repositories/RedisMasterSupervisorRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()
{
Expand Down
8 changes: 4 additions & 4 deletions src/Repositories/RedisMetricsRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
*/
Expand All @@ -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()
{
Expand Down
6 changes: 3 additions & 3 deletions src/Repositories/RedisProcessRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()
{
Expand Down
8 changes: 4 additions & 4 deletions src/Repositories/RedisSupervisorRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions src/Repositories/RedisTagRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()
{
Expand Down
16 changes: 8 additions & 8 deletions src/Repositories/RedisWorkloadRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/SupervisorCommands/Balance.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Balance
/**
* Process the command.
*
* @param Supervisor $supervisor
* @param \Laravel\Horizon\Supervisor $supervisor
* @param array $options
* @return void
*/
Expand Down
2 changes: 1 addition & 1 deletion src/SupervisorCommands/ContinueWorking.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/SupervisorCommands/Pause.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/SupervisorCommands/Restart.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/SupervisorCommands/Scale.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Scale
/**
* Process the command.
*
* @param Supervisor $supervisor
* @param \Laravel\Horizon\Supervisor $supervisor
* @param array $options
* @return void
*/
Expand Down
2 changes: 1 addition & 1 deletion src/SupervisorCommands/Terminate.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Terminate
/**
* Process the command.
*
* @param Terminable $terminable
* @param \Laravel\Horizon\Contracts\Terminable $terminable
* @param array $options
* @return void
*/
Expand Down