Completed
Push — master ( 0d9294...008bc0 )
by
unknown
67:58 queued 27:57
created

JobProcessingEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 45
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getConnectionName() 0 4 1
A getJob() 0 4 1
1
<?php
2
3
namespace SfCod\QueueBundle\Event;
4
5
use SfCod\QueueBundle\Job\JobContractInterface;
6
use Symfony\Component\EventDispatcher\Event;
7
8
/**
9
 * Class JobProcessingEvent
10
 * Event before job starts
11
 *
12
 * @author Virchenko Maksim <[email protected]>
13
 *
14
 * @package SfCod\QueueBundle\Events
15
 */
16
class JobProcessingEvent extends Event
17
{
18
    /**
19
     * The connection name.
20
     *
21
     * @var string
22
     */
23
    protected $connectionName;
24
25
    /**
26
     * The job instance.
27
     *
28
     * @var JobContractInterface
29
     */
30
    protected $job;
31
32
    /**
33
     * Create a new event instance.
34
     *
35
     * @param string $connectionName
36
     * @param JobContractInterface $job
37
     * @param array $config
0 ignored issues
show
Bug introduced by
There is no parameter named $config. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
38
     */
39
    public function __construct(string $connectionName, JobContractInterface $job)
40
    {
41
        $this->job = $job;
42
        $this->connectionName = $connectionName;
43
    }
44
45
    /**
46
     * @return string
47
     */
48
    public function getConnectionName(): string
49
    {
50
        return $this->connectionName;
51
    }
52
53
    /**
54
     * @return JobContractInterface
55
     */
56
    public function getJob(): JobContractInterface
57
    {
58
        return $this->job;
59
    }
60
}
61