SolrReindexQueuedTest_Service   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 13
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getNextJob() 0 4 1
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