RunEvent::__construct()   A
last analyzed

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 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
ccs 2
cts 2
cp 1
cc 1
nc 1
nop 1
crap 1
1
<?php
2
/**
3
 * This file is part of graze/parallel-process.
4
 *
5
 * Copyright © 2018 Nature Delivered Ltd. <https://www.graze.com>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * @license https://github.com/graze/parallel-process/blob/master/LICENSE.md
11
 * @link    https://github.com/graze/parallel-process
12
 */
13
14
namespace Graze\ParallelProcess\Event;
15
16
use Graze\ParallelProcess\RunInterface;
17
use Symfony\Component\EventDispatcher\Event;
18
19
class RunEvent extends Event
20
{
21
    const STARTED    = 'started';
22
    const COMPLETED  = 'completed';
23
    const FAILED     = 'failed';
24
    const UPDATED    = 'updated';
25
    const SUCCESSFUL = 'successful';
26
27
    /** @var RunInterface */
28
    private $run;
29
30
    /**
31
     * RunEvent constructor.
32
     *
33
     * @param RunInterface $run
34
     */
35 76
    public function __construct(RunInterface $run)
36
    {
37 76
        $this->run = $run;
38 76
    }
39
40
    /**
41
     * @return RunInterface
42
     */
43 60
    public function getRun()
44
    {
45 60
        return $this->run;
46
    }
47
}
48