GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

QueueRunner   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 21
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A runQueue() 0 15 3
1
<?php
2
3
namespace Symbiote\QueuedJobs\Tasks\Engines;
4
5
use Symbiote\QueuedJobs\DataObjects\QueuedJobDescriptor;
6
use Symbiote\QueuedJobs\Services\QueuedJobService;
7
8
/**
9
 * Runs all jobs in a queue loop in one process
10
 */
11
class QueueRunner extends BaseRunner implements TaskRunnerEngine
12
{
13
    /**
14
     * @param string $queue
15
     */
16
    public function runQueue($queue)
17
    {
18
        if (QueuedJobService::singleton()->isMaintenanceLockActive()) {
19
            return;
20
        }
21
22
        $service = $this->getService();
23
24
        $nextJob = $service->getNextPendingJob($queue);
25
        $this->logDescriptorStatus($nextJob, $queue);
26
27
        if ($nextJob instanceof QueuedJobDescriptor) {
28
            $service->processJobQueue($queue);
29
        }
30
    }
31
}
32