Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed May 20, 2024
1 parent e2e7654 commit 37b72f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/Queue/Jobs/StompJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,19 +114,20 @@ public function fire()
protected function isNativeLaravelJob(): bool
{
$job = Arr::get($this->payload, 'job');
return ($job && str_contains($job, 'CallQueuedHandler@call'));

return $job && str_contains($job, 'CallQueuedHandler@call');
}

protected function laravelJobClassExists(): bool {
protected function laravelJobClassExists(): bool
{
$eventClassName = Arr::get($this->payload, 'displayName');
if ($eventClassName) {
return class_exists($eventClassName);
}
else {
} else {
$command = Arr::get($this->payload, 'data.command');
$command = $command ?? unserialize($command);
/** @var BroadcastEvent $command */
if ($command & $command->event && (class_exists(get_class($command->event)))) {
if ($command & $command->event && class_exists(get_class($command->event))) {
return true;
}
}
Expand All @@ -139,11 +140,9 @@ protected function fireLaravelJob(): void
if ($this->laravelJobClassExists()) {
[$class, $method] = JobName::parse($this->payload['job']);
($this->instance = $this->resolve($class))->{$method}($this, $this->payload['data']);
}
else {
} else {
$this->log->error("$this->session [STOMP] Laravel job class does not exist!");
}

}

protected function fireExternalJob(): void
Expand Down
1 change: 1 addition & 0 deletions src/Queue/StompQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ public function pop($queue = null)
if (!$queueFromFrame) {
$this->log->error("$this->session [STOMP] Wrong frame received. Expected MESSAGE, got: " . print_r($frame, true));
$this->_lastFrame = null;

return null;
}

Expand Down

0 comments on commit 37b72f3

Please sign in to comment.