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::runQueue()   A
last analyzed

Complexity

Conditions 3
Paths 3

Size

Total Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 9.7666
c 0
b 0
f 0
cc 3
nc 3
nop 1
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