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.

TestQJService   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testInit() 0 4 1
A getLogger() 0 4 2
1
<?php
2
3
namespace Symbiote\QueuedJobs\Tests\QueuedJobsTest;
4
5
use Symbiote\QueuedJobs\Services\QueuedJobService;
6
use SilverStripe\Dev\TestOnly;
7
8
// stub class to be able to call init from an external context
9
class TestQJService extends QueuedJobService implements TestOnly
10
{
11
    /**
12
     * Not inherited from QueuedJobService unfortunately...
13
     * @var array
14
     */
15
    private $logger;
16
17
    private static $dependencies = [
18
        'queueHandler' => '%$QueueHandler'
19
    ];
20
21
    public function testInit($descriptor)
22
    {
23
        return $this->initialiseJob($descriptor);
24
    }
25
26
    public function getLogger()
27
    {
28
        return isset($this->logger) ? $this->logger : $this->logger = new QueuedJobsTest_RecordingLogger();
0 ignored issues
show
Documentation Bug introduced by
It seems like new \Symbiote\QueuedJobs...sTest_RecordingLogger() of type object<Symbiote\QueuedJo...bsTest_RecordingLogger> is incompatible with the declared type array of property $logger.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
Bug Compatibility introduced by
The expression isset($this->logger) ? $...est_RecordingLogger()); of type array|Symbiote\QueuedJob...obsTest_RecordingLogger adds the type array to the return on line 28 which is incompatible with the return type of the parent method Symbiote\QueuedJobs\Serv...edJobService::getLogger of type Psr\Log\LoggerInterface.
Loading history...
29
    }
30
}
31