ChainFactory::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 3
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