PipelineFactory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

2 Methods

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