ImmediateQueueHandler   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A startJobOnQueue() 0 4 1
1
<?php
2
3
namespace Symbiote\QueuedJobs\Services;
4
5
use Symbiote\QueuedJobs\DataObjects\QueuedJobDescriptor;
6
7
/**
8
 * execute jobs immediately in the current request context
9
 *
10
 * @author [email protected]
11
 * @license BSD License http://silverstripe.org/bsd-license/
12
 */
13
class ImmediateQueueHandler
14
{
15
    /**
16
     * @var array
17
     */
18
    private static $dependencies = array(
0 ignored issues
show
Unused Code introduced by
The property $dependencies is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
19
        'queuedJobService' => '%$Symbiote\\QueuedJobs\\Services\\QueuedJobService',
20
    );
21
22
    /**
23
     * @var QueuedJobService
24
     */
25
    public $queuedJobService;
26
27
    /**
28
     * @param QueuedJobDescriptor $job
29
     */
30
    public function startJobOnQueue(QueuedJobDescriptor $job)
31
    {
32
        $this->queuedJobService->runJob($job->ID);
33
    }
34
}
35