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

WorkerWasStarted   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 60%

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 27
ccs 3
cts 5
cp 0.6
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getWorker() 0 3 1
A __construct() 0 3 1
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