Passed
Pull Request — master (#16)
by Harry
07:40 queued 02:51
created

RunEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 8
dl 0
loc 26
rs 10
c 0
b 0
f 0
ccs 5
cts 5
cp 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getRun() 0 3 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
26
    /** @var RunInterface */
27
    private $run;
28
29
    /**
30
     * RunEvent constructor.
31
     *
32
     * @param RunInterface $run
33
     */
34 53
    public function __construct(RunInterface $run)
35
    {
36 53
        $this->run = $run;
37 53
    }
38
39
    /**
40
     * @return RunInterface
41
     */
42 34
    public function getRun()
43
    {
44 34
        return $this->run;
45
    }
46
}
47