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

JobProcessedEvent::getJob()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
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 JobProcessedEvent
10
 * Event on job processed event
11
 *
12
 * @author Virchenko Maksim <[email protected]>
13
 *
14
 * @package SfCod\QueueBundle\Events
15
 */
16
class JobProcessedEvent 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