Passed
Push — main ( bd03c4...c6ca62 )
by De Cramer
04:36
created

DeleteFilesForOldExecutionFactory::build()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 2
1
<?php
2
3
namespace Oliverde8\PhpEtlBundle\Etl\OperationFactory\Cleanup;
4
5
use Oliverde8\Component\PhpEtl\Builder\Factories\AbstractFactory;
6
use Oliverde8\Component\PhpEtl\ChainOperation\ChainOperationInterface;
7
use Oliverde8\PhpEtlBundle\Etl\Operation\Cleanup\DeleteFilesForOldExecutionOperation;
8
use Oliverde8\PhpEtlBundle\Repository\EtlExecutionRepository;
9
use Oliverde8\PhpEtlBundle\Services\ChainWorkDirManager;
10
use Symfony\Component\Validator\Constraints as Assert;
11
12
class DeleteFilesForOldExecutionFactory extends AbstractFactory
13
{
14
    /** @var ChainWorkDirManager */
15
    protected $chainWorkdDirManager;
16
17
    /**
18
     * DeleteFilesForOldExecutionOperation constructor.
19
     * @param ChainWorkDirManager $chainWorkdDirManager
20
     */
21
    public function __construct(ChainWorkDirManager $chainWorkdDirManager)
22
    {
23
        $this->chainWorkdDirManager = $chainWorkdDirManager;
24
25
        $this->operation = 'Etl/Cleanup/DeleteFilesForOldExecution';
26
        $this->class = DeleteFilesForOldExecutionOperation::class;
27
    }
28
29
    /**
30
     * Build an operation of a certain type with the options.
31
     *
32
     * @param String $operation
33
     * @param array $options
34
     *
35
     * @return ChainOperationInterface
36
     */
37
    protected function build($operation, $options)
38
    {
39
        return $this->create($this->chainWorkdDirManager);
40
    }
41
}
42