TaskEvent::runContext()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 1
cts 1
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Zenstruck\ScheduleBundle\Event;
4
5
use Symfony\Contracts\EventDispatcher\Event;
6
use Zenstruck\ScheduleBundle\Schedule\Task\TaskRunContext;
7
8
/**
9
 * @author Kevin Bond <[email protected]>
10
 */
11
abstract class TaskEvent extends Event
12
{
13
    /** @var TaskRunContext */
14
    private $runContext;
15 63
16
    final public function __construct(TaskRunContext $runContext)
17 63
    {
18 63
        $this->runContext = $runContext;
19
    }
20 13
21
    final public function runContext(): TaskRunContext
22 13
    {
23
        return $this->runContext;
24
    }
25
}
26