Skip to content

Commit

Permalink
style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
naquad committed Feb 23, 2024
1 parent be86434 commit 6dfd892
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
5 changes: 3 additions & 2 deletions src/Illuminate/Queue/CallQueuedHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public function call(Job $job, array $data)
);
} catch (ModelNotFoundException $e) {
$this->ensureUniqueJobLockIsReleased($data);

return $this->handleModelNotFound($job, $e);
}

Expand All @@ -84,7 +85,7 @@ public function call(Job $job, array $data)
/**
* Get the unserialized object from the given payload.
*
* @param string $key
* @param string $key
* @param array $data
* @return mixed
*/
Expand Down Expand Up @@ -128,7 +129,7 @@ protected function getCommand(array $data)
/**
* Get the unique handler from the given payload.
*
* @param array $data
* @param array $data
* @return \Illuminate\Queue\UniqueHandler|null
*/
protected function getUniqueHandler(array $data)
Expand Down
12 changes: 7 additions & 5 deletions src/Illuminate/Queue/UniqueHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
class UniqueHandler
{
/**
* Original job name
* Original job name.
*
* @var string
*/
Expand All @@ -37,22 +37,23 @@ class UniqueHandler

/**
* The container instance.
*
* @var \Illuminate\Contracts\Container\Container
*/
protected $container;

/**
* Create a new handler instance.
*
* @param object $job
* @param object $job
*/
public function __construct(object $job)
{
$this->jobName = get_class($job);

if (method_exists($job, 'uniqueId')) {
$this->uniqueId = $job->uniqueId();
} else if (isset($job->uniqueId)) {
} elseif (isset($job->uniqueId)) {
$this->uniqueId = $job->uniqueId;
}

Expand All @@ -64,7 +65,7 @@ public function __construct(object $job)
/**
* Creates a new instance if the job should be unique.
*
* @param object $job
* @param object $job
* @return \Illuminate\Queue\UniqueHandler|null
*/
public static function forJob(object $job)
Expand All @@ -82,12 +83,13 @@ public static function forJob(object $job)
/**
* Sets the container instance.
*
* @param \Illuminate\Contracts\Container\Container $container
* @param \Illuminate\Contracts\Container\Container $container
* @return \Illuminate\Queue\UpdateHandler
*/
public function withContainer(Container $container)
{
$this->container = $container;

return $this;
}

Expand Down

0 comments on commit 6dfd892

Please sign in to comment.