Passed
Push — master ( 404999...eb0db0 )
by Brice
02:41
created

WorkerWasStarted::getWorker()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace JobQueue\Domain\Worker;
4
5
use Symfony\Component\EventDispatcher\Event;
6
7
final class WorkerWasStarted extends Event
8
{
9
    const NAME = 'worker.started';
10
11
    /**
12
     *
13
     * @var Worker
14
     */
15
    private $worker;
16
17
    /**
18
     *
19
     * @param Worker $worker
20
     */
21 4
    public function __construct(Worker $worker)
22
    {
23 4
        $this->worker = $worker;
24 4
    }
25
26
    /**
27
     *
28
     * @return Worker
29
     */
30
    public function getWorker(): Worker
31
    {
32
        return $this->worker;
33
    }
34
}
35