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.

ProcessJobQueueChildTask::getService()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Symbiote\QueuedJobs\Tasks;
4
5
use SilverStripe\Control\HTTPRequest;
6
use SilverStripe\Dev\BuildTask;
7
use Symbiote\QueuedJobs\Services\QueuedJobService;
8
9
class ProcessJobQueueChildTask extends BuildTask
10
{
11
    /**
12
     * {@inheritDoc}
13
     * @var string
14
     */
15
    private static $segment = 'ProcessJobQueueChildTask';
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
16
17
    /**
18
     * @param HTTPRequest $request
19
     */
20
    public function run($request)
21
    {
22
        if (!isset($_SERVER['argv'][2])) {
23
            print "No task data provided.\n";
24
            return;
25
        }
26
27
        $task = @unserialize(@base64_decode($_SERVER['argv'][2]));
28
29
        if ($task) {
30
            $this->getService()->runJob($task->getDescriptor()->ID);
31
        }
32
    }
33
34
    /**
35
     * Returns an instance of the QueuedJobService.
36
     *
37
     * @return QueuedJobService
38
     */
39
    protected function getService()
40
    {
41
        return QueuedJobService::singleton();
42
    }
43
}
44