Passed
Branch master (aecce8)
by Brice
05:03
created

TaskWasFetched::getTask()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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