SolrReindexQueuedTest_Service::getNextJob()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
1
<?php
2
3
namespace SilverStripe\FullTextSearch\Tests\SolrReindexQueuedTest;
4
5
use SilverStripe\Dev\TestOnly;
6
use Symbiote\QueuedJobs\Services\QueuedJob;
0 ignored issues
show
Bug introduced by
The type Symbiote\QueuedJobs\Services\QueuedJob was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
use Symbiote\QueuedJobs\Services\QueuedJobService;
0 ignored issues
show
Bug introduced by
The type Symbiote\QueuedJobs\Services\QueuedJobService was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
9
if (!class_exists(QueuedJobService::class)) {
10
    return;
11
}
12
13
class SolrReindexQueuedTest_Service extends QueuedJobService implements TestOnly
14
{
15
    private static $dependencies = [
0 ignored issues
show
introduced by
The private property $dependencies is not used, and could be removed.
Loading history...
16
        'queueHandler' => '%$QueueHandler'
17
    ];
18
19
    /**
20
     * @return QueuedJob
21
     */
22
    public function getNextJob()
23
    {
24
        $job = $this->getNextPendingJob();
25
        return $this->initialiseJob($job);
26
    }
27
}
28