ChainFactory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 4
c 1
b 0
f 0
dl 0
loc 17
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
4
namespace Oliverde8\PhpEtlBundle\Factory;
5
6
7
use Oliverde8\Component\PhpEtl\ChainBuilder;
8
use Oliverde8\Component\PhpEtl\ChainProcessor;
9
10
class ChainFactory
11
{
12
    /** @var ChainBuilder */
13
    protected $chainBuilder;
14
15
    /**
16
     * ChainFactory constructor.
17
     * @param ChainBuilder $chainBuilder
18
     */
19
    public function __construct(ChainBuilder $chainBuilder)
20
    {
21
        $this->chainBuilder = $chainBuilder;
22
    }
23
24
    public function create($config, array $inputOptions, int $maxAsynchronousItems): ChainProcessor
25
    {
26
        return $this->chainBuilder->buildChainProcessor($config, $inputOptions, $maxAsynchronousItems);
27
    }
28
}
29