Passed
Push — master ( b4e3f0...d6a119 )
by Robbie
04:16 queued 02:31
created

BatchedProcessor_QueuedJobService   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 16
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getJobs() 0 3 1
A queueJob() 0 7 1
1
<?php
2
3
namespace SilverStripe\FullTextSearch\Tests\BatchedProcessorTest;
4
5
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...
6
7
class BatchedProcessor_QueuedJobService
8
{
9
    protected $jobs = array();
10
11
    public function queueJob(QueuedJob $job, $startAfter = null, $userId = null, $queueName = null)
0 ignored issues
show
Unused Code introduced by
The parameter $userId is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

11
    public function queueJob(QueuedJob $job, $startAfter = null, /** @scrutinizer ignore-unused */ $userId = null, $queueName = null)

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

Loading history...
Unused Code introduced by
The parameter $queueName is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

11
    public function queueJob(QueuedJob $job, $startAfter = null, $userId = null, /** @scrutinizer ignore-unused */ $queueName = null)

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

Loading history...
12
    {
13
        $this->jobs[] = array(
14
            'job' => $job,
15
            'startAfter' => $startAfter
16
        );
17
        return $job;
18
    }
19
20
    public function getJobs()
21
    {
22
        return $this->jobs;
23
    }
24
}
25