PoolRunEvent::getPool()   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 0
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\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