DeleteFilesForOldExecutionFactory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A build() 0 3 1
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 Oliverde8\PhpEtlBundle\Services\FileSystemFactoryInterface;
11
use Symfony\Component\Validator\Constraints as Assert;
12
13
class DeleteFilesForOldExecutionFactory extends AbstractFactory
14
{
15
    /** @var ChainWorkDirManager */
16
    protected $chainWorkdDirManager;
17
18
    protected FileSystemFactoryInterface $fileSystemFactory;
19
20
    public function __construct(ChainWorkDirManager $chainWorkdDirManager, FileSystemFactoryInterface $fileSystemFactory)
21
    {
22
        $this->chainWorkdDirManager = $chainWorkdDirManager;
23
        $this->fileSystemFactory = $fileSystemFactory;
24
25
        $this->operation = 'Etl/Cleanup/DeleteFilesForOldExecution';
26
        $this->class = DeleteFilesForOldExecutionOperation::class;
27
    }
28
29
    protected function build(string $operation, array $options): ChainOperationInterface
30
    {
31
        return $this->create($this->chainWorkdDirManager, $this->fileSystemFactory);
32
    }
33
}
34