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 (#290)
by
unknown
01:34
created

Extension   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 19
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A updateJobDescriptorAndJobOnException() 0 8 1
1
<?php
2
3
namespace App\Queue;
4
5
use Exception;
6
use SilverStripe\Core\ClassInfo;
7
use SilverStripe\Core\Extension as BaseExtension;
8
use Symbiote\QueuedJobs\DataObjects\QueuedJobDescriptor;
9
use Symbiote\QueuedJobs\Services\QueuedJob;
10
use Symbiote\QueuedJobs\Services\QueuedJobService;
11
use Throwable;
12
13
/**
14
 * Class Extension
15
 *
16
 * @property $this|QueuedJobService $owner
17
 * @package App\Queue
18
 */
19
class Extension extends BaseExtension
20
{
21
22
    /**
23
     * Extension point in @see QueuedJobService::runJob()
24
     *
25
     * @param QueuedJobDescriptor $descriptor
26
     * @param QueuedJob $job
27
     * @param Throwable|Exception $e
28
     */
29
    public function updateJobDescriptorAndJobOnException(
30
        QueuedJobDescriptor $descriptor,
0 ignored issues
show
Unused Code introduced by
The parameter $descriptor is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
31
        QueuedJob $job,
32
        Throwable $e
33
    ): void {
34
        // capture exception in the messages of the broken job for better debug options
35
        $job->addMessage(sprintf('%s : %s', ClassInfo::shortName($e), $e->getMessage()));
36
    }
37
}
38