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.
Completed
Pull Request — master (#234)
by Robbie
01:57
created

ProcessJobQueueChildTask::getService()   A

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';
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::class::singleton();
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM, expecting ';'
Loading history...
42
    }
43
}
44