Passed
Push — master ( 71b580...625333 )
by Harry
01:57
created

PoolRunEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 6
dl 0
loc 25
rs 10
c 0
b 0
f 0
ccs 6
cts 6
cp 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getPool() 0 3 1
A __construct() 0 4 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\Pool;
17
use Graze\ParallelProcess\RunInterface;
18
19
class PoolRunEvent extends RunEvent
20
{
21
    const POOL_RUN_ADDED = 'run.added';
22
23
    /** @var Pool */
24
    private $pool;
25
26
    /**
27
     * PoolRunEvent constructor.
28
     *
29
     * @param Pool         $pool
30
     * @param RunInterface $run
31
     */
32 43
    public function __construct(Pool $pool, RunInterface $run)
33
    {
34 43
        parent::__construct($run);
35 43
        $this->pool = $pool;
36 43
    }
37
38
    /**
39
     * @return Pool
40
     */
41 2
    public function getPool()
42
    {
43 2
        return $this->pool;
44
    }
45
}
46