PoolRunEvent   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 6
c 1
b 0
f 0
dl 0
loc 25
rs 10
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\PoolInterface;
17
use Graze\ParallelProcess\RunInterface;
18
19
class PoolRunEvent extends RunEvent
20
{
21
    const POOL_RUN_ADDED = 'run.added';
22
23
    /** @var PoolInterface */
24
    private $pool;
25
26
    /**
27
     * PoolRunEvent constructor.
28
     *
29
     * @param PoolInterface $pool
30
     * @param RunInterface  $run
31
     */
32 55
    public function __construct(PoolInterface $pool, RunInterface $run)
33
    {
34 55
        parent::__construct($run);
35 55
        $this->pool = $pool;
36 55
    }
37
38
    /**
39
     * @return PoolInterface
40
     */
41 5
    public function getPool()
42
    {
43 5
        return $this->pool;
44
    }
45
}
46