diff --git a/src/Illuminate/Queue/Events/JobAttempted.php b/src/Illuminate/Queue/Events/JobAttempted.php index 6dfa2df148ab..b2303143c77d 100644 --- a/src/Illuminate/Queue/Events/JobAttempted.php +++ b/src/Illuminate/Queue/Events/JobAttempted.php @@ -4,40 +4,19 @@ class JobAttempted { - /** - * The connection name. - * - * @var string - */ - public $connectionName; - - /** - * The job instance. - * - * @var \Illuminate\Contracts\Queue\Job - */ - public $job; - - /** - * Indicates if an exception occurred while processing the job. - * - * @var bool - */ - public $exceptionOccurred; - /** * Create a new event instance. * - * @param string $connectionName - * @param \Illuminate\Contracts\Queue\Job $job - * @param bool $exceptionOccurred + * @param string $connectionName The connection name. + * @param \Illuminate\Contracts\Queue\Job $job The job instance. + * @param bool $exceptionOccurred Indicates if an exception occurred while processing the job. * @return void */ - public function __construct($connectionName, $job, $exceptionOccurred = false) - { - $this->job = $job; - $this->connectionName = $connectionName; - $this->exceptionOccurred = $exceptionOccurred; + public function __construct( + public $connectionName, + public $job, + public $exceptionOccurred = false, + ) { } /** diff --git a/src/Illuminate/Queue/Events/JobExceptionOccurred.php b/src/Illuminate/Queue/Events/JobExceptionOccurred.php index 4bdf39226bf7..301bd524f86b 100644 --- a/src/Illuminate/Queue/Events/JobExceptionOccurred.php +++ b/src/Illuminate/Queue/Events/JobExceptionOccurred.php @@ -4,39 +4,18 @@ class JobExceptionOccurred { - /** - * The connection name. - * - * @var string - */ - public $connectionName; - - /** - * The job instance. - * - * @var \Illuminate\Contracts\Queue\Job - */ - public $job; - - /** - * The exception instance. - * - * @var \Throwable - */ - public $exception; - /** * Create a new event instance. * - * @param string $connectionName - * @param \Illuminate\Contracts\Queue\Job $job - * @param \Throwable $exception + * @param string $connectionName The connection name. + * @param \Illuminate\Contracts\Queue\Job $job The job instance. + * @param \Throwable $exception The exception instance. * @return void */ - public function __construct($connectionName, $job, $exception) - { - $this->job = $job; - $this->exception = $exception; - $this->connectionName = $connectionName; + public function __construct( + public $connectionName, + public $job, + public $exception, + ) { } } diff --git a/src/Illuminate/Queue/Events/JobFailed.php b/src/Illuminate/Queue/Events/JobFailed.php index d973a5039ed8..a39fdedad592 100644 --- a/src/Illuminate/Queue/Events/JobFailed.php +++ b/src/Illuminate/Queue/Events/JobFailed.php @@ -4,39 +4,18 @@ class JobFailed { - /** - * The connection name. - * - * @var string - */ - public $connectionName; - - /** - * The job instance. - * - * @var \Illuminate\Contracts\Queue\Job - */ - public $job; - - /** - * The exception that caused the job to fail. - * - * @var \Throwable - */ - public $exception; - /** * Create a new event instance. * - * @param string $connectionName - * @param \Illuminate\Contracts\Queue\Job $job - * @param \Throwable $exception + * @param string $connectionName The connection name. + * @param \Illuminate\Contracts\Queue\Job $job The job instance. + * @param \Throwable $exception The exception that caused the job to fail. * @return void */ - public function __construct($connectionName, $job, $exception) - { - $this->job = $job; - $this->exception = $exception; - $this->connectionName = $connectionName; + public function __construct( + public $connectionName, + public $job, + public $exception, + ) { } } diff --git a/src/Illuminate/Queue/Events/JobPopped.php b/src/Illuminate/Queue/Events/JobPopped.php index e56e11d30899..ca907a8c7dff 100644 --- a/src/Illuminate/Queue/Events/JobPopped.php +++ b/src/Illuminate/Queue/Events/JobPopped.php @@ -4,30 +4,16 @@ class JobPopped { - /** - * The connection name. - * - * @var string - */ - public $connectionName; - - /** - * The job instance. - * - * @var \Illuminate\Contracts\Queue\Job|null - */ - public $job; - /** * Create a new event instance. * - * @param string $connectionName - * @param \Illuminate\Contracts\Queue\Job|null $job + * @param string $connectionName The connection name. + * @param \Illuminate\Contracts\Queue\Job|null $job The job instance. * @return void */ - public function __construct($connectionName, $job) - { - $this->connectionName = $connectionName; - $this->job = $job; + public function __construct( + public $connectionName, + public $job, + ) { } } diff --git a/src/Illuminate/Queue/Events/JobPopping.php b/src/Illuminate/Queue/Events/JobPopping.php index abb0bb41da7f..1eb5fd6970a7 100644 --- a/src/Illuminate/Queue/Events/JobPopping.php +++ b/src/Illuminate/Queue/Events/JobPopping.php @@ -4,21 +4,14 @@ class JobPopping { - /** - * The connection name. - * - * @var string - */ - public $connectionName; - /** * Create a new event instance. * - * @param string $connectionName + * @param string $connectionName The connection name. * @return void */ - public function __construct($connectionName) - { - $this->connectionName = $connectionName; + public function __construct( + public $connectionName, + ) { } } diff --git a/src/Illuminate/Queue/Events/JobProcessed.php b/src/Illuminate/Queue/Events/JobProcessed.php index f8abefb67f57..e7b8ce17c068 100644 --- a/src/Illuminate/Queue/Events/JobProcessed.php +++ b/src/Illuminate/Queue/Events/JobProcessed.php @@ -4,30 +4,16 @@ class JobProcessed { - /** - * The connection name. - * - * @var string - */ - public $connectionName; - - /** - * The job instance. - * - * @var \Illuminate\Contracts\Queue\Job - */ - public $job; - /** * Create a new event instance. * - * @param string $connectionName - * @param \Illuminate\Contracts\Queue\Job $job + * @param string $connectionName The connection name. + * @param \Illuminate\Contracts\Queue\Job $job The job instance. * @return void */ - public function __construct($connectionName, $job) - { - $this->job = $job; - $this->connectionName = $connectionName; + public function __construct( + public $connectionName, + public $job, + ) { } } diff --git a/src/Illuminate/Queue/Events/JobProcessing.php b/src/Illuminate/Queue/Events/JobProcessing.php index 3dd97248b003..a48cc15aa195 100644 --- a/src/Illuminate/Queue/Events/JobProcessing.php +++ b/src/Illuminate/Queue/Events/JobProcessing.php @@ -4,30 +4,16 @@ class JobProcessing { - /** - * The connection name. - * - * @var string - */ - public $connectionName; - - /** - * The job instance. - * - * @var \Illuminate\Contracts\Queue\Job - */ - public $job; - /** * Create a new event instance. * - * @param string $connectionName - * @param \Illuminate\Contracts\Queue\Job $job + * @param string $connectionName The connection name. + * @param \Illuminate\Contracts\Queue\Job $job The job instance. * @return void */ - public function __construct($connectionName, $job) - { - $this->job = $job; - $this->connectionName = $connectionName; + public function __construct( + public $connectionName, + public $job, + ) { } } diff --git a/src/Illuminate/Queue/Events/JobQueued.php b/src/Illuminate/Queue/Events/JobQueued.php index 5e992238aa85..68667876bfe3 100644 --- a/src/Illuminate/Queue/Events/JobQueued.php +++ b/src/Illuminate/Queue/Events/JobQueued.php @@ -4,67 +4,25 @@ class JobQueued { - /** - * The connection name. - * - * @var string - */ - public $connectionName; - - /** - * The queue name. - * - * @var string|null - */ - public $queue; - - /** - * The job ID. - * - * @var string|int|null - */ - public $id; - - /** - * The job instance. - * - * @var \Closure|string|object - */ - public $job; - - /** - * The job payload. - * - * @var string - */ - public $payload; - - /** - * The amount of time the job was delayed. - * - * @var int|null - */ - public $delay; - /** * Create a new event instance. * - * @param string $connectionName - * @param string $queue - * @param string|int|null $id - * @param \Closure|string|object $job - * @param string $payload - * @param int|null $delay + * @param string $connectionName The connection name. + * @param string $queue The queue name. + * @param string|int|null $id The job ID. + * @param \Closure|string|object $job The job instance. + * @param string $payload The job payload. + * @param int|null $delay The amount of time the job was delayed. * @return void */ - public function __construct($connectionName, $queue, $id, $job, $payload, $delay) - { - $this->connectionName = $connectionName; - $this->queue = $queue; - $this->id = $id; - $this->job = $job; - $this->payload = $payload; - $this->delay = $delay; + public function __construct( + public $connectionName, + public $queue, + public $id, + public $job, + public $payload, + public $delay, + ) { } /** diff --git a/src/Illuminate/Queue/Events/JobQueueing.php b/src/Illuminate/Queue/Events/JobQueueing.php index 6a35a64b8cca..ef97e1e71395 100644 --- a/src/Illuminate/Queue/Events/JobQueueing.php +++ b/src/Illuminate/Queue/Events/JobQueueing.php @@ -4,58 +4,23 @@ class JobQueueing { - /** - * The connection name. - * - * @var string - */ - public $connectionName; - - /** - * The queue name. - * - * @var string - */ - public $queue; - - /** - * The job instance. - * - * @var \Closure|string|object - */ - public $job; - - /** - * The job payload. - * - * @var string - */ - public $payload; - - /** - * The number of seconds the job was delayed. - * - * @var int|null - */ - public $delay; - /** * Create a new event instance. * - * @param string $connectionName - * @param string $queue - * @param \Closure|string|object $job - * @param string $payload - * @param int|null $delay + * @param string $connectionName The connection name. + * @param string $queue The queue name. + * @param \Closure|string|object $job The job instance. + * @param string $payload The job payload. + * @param int|null $delay The number of seconds the job was delayed. * @return void */ - public function __construct($connectionName, $queue, $job, $payload, $delay) - { - $this->connectionName = $connectionName; - $this->queue = $queue; - $this->job = $job; - $this->payload = $payload; - $this->delay = $delay; + public function __construct( + public $connectionName, + public $queue, + public $job, + public $payload, + public $delay, + ) { } /** diff --git a/src/Illuminate/Queue/Events/JobReleasedAfterException.php b/src/Illuminate/Queue/Events/JobReleasedAfterException.php index 4600c0b14bd3..b2271ed4134a 100644 --- a/src/Illuminate/Queue/Events/JobReleasedAfterException.php +++ b/src/Illuminate/Queue/Events/JobReleasedAfterException.php @@ -4,30 +4,16 @@ class JobReleasedAfterException { - /** - * The connection name. - * - * @var string - */ - public $connectionName; - - /** - * The job instance. - * - * @var \Illuminate\Contracts\Queue\Job - */ - public $job; - /** * Create a new event instance. * - * @param string $connectionName - * @param \Illuminate\Contracts\Queue\Job $job + * @param string $connectionName The connection name. + * @param \Illuminate\Contracts\Queue\Job $job The job instance. * @return void */ - public function __construct($connectionName, $job) - { - $this->job = $job; - $this->connectionName = $connectionName; + public function __construct( + public $connectionName, + public $job, + ) { } } diff --git a/src/Illuminate/Queue/Events/JobRetryRequested.php b/src/Illuminate/Queue/Events/JobRetryRequested.php index 9b9809f63950..99bd8d40c38f 100644 --- a/src/Illuminate/Queue/Events/JobRetryRequested.php +++ b/src/Illuminate/Queue/Events/JobRetryRequested.php @@ -4,13 +4,6 @@ class JobRetryRequested { - /** - * The job instance. - * - * @var \stdClass - */ - public $job; - /** * The decoded job payload. * @@ -21,12 +14,12 @@ class JobRetryRequested /** * Create a new event instance. * - * @param \stdClass $job + * @param \stdClass $job The job instance. * @return void */ - public function __construct($job) - { - $this->job = $job; + public function __construct( + public $job, + ) { } /** diff --git a/src/Illuminate/Queue/Events/JobTimedOut.php b/src/Illuminate/Queue/Events/JobTimedOut.php index c36dea5352e3..2b5e43650df0 100644 --- a/src/Illuminate/Queue/Events/JobTimedOut.php +++ b/src/Illuminate/Queue/Events/JobTimedOut.php @@ -4,30 +4,16 @@ class JobTimedOut { - /** - * The connection name. - * - * @var string - */ - public $connectionName; - - /** - * The job instance. - * - * @var \Illuminate\Contracts\Queue\Job - */ - public $job; - /** * Create a new event instance. * - * @param string $connectionName - * @param \Illuminate\Contracts\Queue\Job $job + * @param string $connectionName The connection name. + * @param \Illuminate\Contracts\Queue\Job $job The job instance. * @return void */ - public function __construct($connectionName, $job) - { - $this->job = $job; - $this->connectionName = $connectionName; + public function __construct( + public $connectionName, + public $job, + ) { } } diff --git a/src/Illuminate/Queue/Events/Looping.php b/src/Illuminate/Queue/Events/Looping.php index f9538e4c504f..f8056e453afa 100644 --- a/src/Illuminate/Queue/Events/Looping.php +++ b/src/Illuminate/Queue/Events/Looping.php @@ -4,30 +4,16 @@ class Looping { - /** - * The connection name. - * - * @var string - */ - public $connectionName; - - /** - * The queue name. - * - * @var string - */ - public $queue; - /** * Create a new event instance. * - * @param string $connectionName - * @param string $queue + * @param string $connectionName The connection name. + * @param string $queue The queue name. * @return void */ - public function __construct($connectionName, $queue) - { - $this->queue = $queue; - $this->connectionName = $connectionName; + public function __construct( + public $connectionName, + public $queue, + ) { } } diff --git a/src/Illuminate/Queue/Events/QueueBusy.php b/src/Illuminate/Queue/Events/QueueBusy.php index 684dec4ea08a..a563ec0545fc 100644 --- a/src/Illuminate/Queue/Events/QueueBusy.php +++ b/src/Illuminate/Queue/Events/QueueBusy.php @@ -4,39 +4,18 @@ class QueueBusy { - /** - * The connection name. - * - * @var string - */ - public $connection; - - /** - * The queue name. - * - * @var string - */ - public $queue; - - /** - * The size of the queue. - * - * @var int - */ - public $size; - /** * Create a new event instance. * - * @param string $connection - * @param string $queue - * @param int $size + * @param string $connection The connection name. + * @param string $queue The queue name. + * @param int $size The size of the queue. * @return void */ - public function __construct($connection, $queue, $size) - { - $this->connection = $connection; - $this->queue = $queue; - $this->size = $size; + public function __construct( + public $connection, + public $queue, + public $size, + ) { } } diff --git a/src/Illuminate/Queue/Events/WorkerStopping.php b/src/Illuminate/Queue/Events/WorkerStopping.php index ccebb3cbb01a..6d862bac3c25 100644 --- a/src/Illuminate/Queue/Events/WorkerStopping.php +++ b/src/Illuminate/Queue/Events/WorkerStopping.php @@ -4,30 +4,16 @@ class WorkerStopping { - /** - * The worker exit status. - * - * @var int - */ - public $status; - - /** - * The worker options. - * - * @var \Illuminate\Queue\WorkerOptions|null - */ - public $workerOptions; - /** * Create a new event instance. * - * @param int $status - * @param \Illuminate\Queue\WorkerOptions|null $workerOptions + * @param int $status The worker exit status. + * @param \Illuminate\Queue\WorkerOptions|null $workerOptions The worker options. * @return void */ - public function __construct($status = 0, $workerOptions = null) - { - $this->status = $status; - $this->workerOptions = $workerOptions; + public function __construct( + public $status = 0, + public $workerOptions = null + ) { } }