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

JobsReceivedEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 3
c 2
b 0
f 1
lcom 0
cbo 1
dl 0
loc 44
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getJobs() 0 4 1
A getQueues() 0 4 1
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
}