Completed
Pull Request — master (#94)
by Alessandro
04:33
created

PipelineFactory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 19
ccs 4
cts 4
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A create() 0 4 1
1
<?php
2
3
namespace Paraunit\Runner;
4
5
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
6
7
/**
8
 * Class PipelineFactory
9
 * @package Paraunit\Runner
10
 */
11
class PipelineFactory
12
{
13
    /** @var EventDispatcherInterface */
14
    private $dispatcher;
15
16 30
    public function __construct(EventDispatcherInterface $dispatcher)
17
    {
18 30
        $this->dispatcher = $dispatcher;
19
    }
20
21
    /**
22
     * @param int $pipelineNumber
23
     * @return Pipeline
24
     */
25 30
    public function create(int $pipelineNumber): Pipeline
26
    {
27 30
        return new Pipeline($this->dispatcher, $pipelineNumber);
28
    }
29
}
30