Completed
Pull Request — master (#16)
by Jan
26:20 queued 11:22
created

JobsReceivedEvent::getJobs()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Phloppy\Event;
4
5
use Symfony\Component\EventDispatcher\Event;
6
7
class JobsReceivedEvent extends Event
8
{
9
    const ID = 'job.getjob';
10
11
    /**
12
     * @var Job[]
13
     */
14
    private $jobs;
15
16
    /**
17
     * @var string[]
18
     */
19
    private $queues;
20
21
22
    /**
23
     * @param string[] $queues
24
     * @param Job[] $jobs
25
     */
26
    public function __construct(array $queues, array $jobs)
27
    {
28
        $this->queues = $queues;
29
        $this->jobs = $jobs;
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 3 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
30
    }
31
32
33
    /**
34
     * @return Job[]
35
     */
36
    public function getJobs()
37
    {
38
        return $this->jobs;
39
    }
40
41
42
    /**
43
     * @return string[]
44
     */
45
    public function getQueues()
46
    {
47
        return $this->queues;
48
    }
49
50
}