GearmanWorkStartingEvent::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
/**
4
 * Gearman Bundle for Symfony2 / Symfony3
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 *
9
 * Feel free to edit as you please, and have fun.
10
 *
11
 * @author Marc Morera <[email protected]>
12
 */
13
14
namespace Mkk\GearmanBundle\Event;
15
16
use Symfony\Component\EventDispatcher\Event;
17
18
/**
19
 * GearmanWorkStartingEvent
20
 *
21
 * @author David Moreau <[email protected]>
22
 */
23
class GearmanWorkStartingEvent extends Event
24
{
25
    /**
26
     * @var array
27
     *
28
     * Gearman jobs running
29
     */
30
    protected $jobs;
31
32
    /**
33
     * Construct method
34
     *
35
     * @param array $jobs Jobs
36
     */
37 1
    public function __construct(array $jobs)
38
    {
39 1
        $this->jobs = $jobs;
40 1
    }
41
42
    /**
43
     * Get Gearman Work subscribed jobs
44
     *
45
     * @return array Subscribed jobs
46
     */
47
    public function getJobs()
48
    {
49
        return $this->jobs;
50
    }
51
}
52