DeleteEntityForOldExecutionFactory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A build() 0 3 1
A __construct() 0 6 1
1
<?php
2
3
namespace Oliverde8\PhpEtlBundle\Etl\OperationFactory\Cleanup;
4
5
use Doctrine\ORM\EntityManagerInterface;
0 ignored issues
show
Bug introduced by
The type Doctrine\ORM\EntityManagerInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use Oliverde8\Component\PhpEtl\Builder\Factories\AbstractFactory;
7
use Oliverde8\Component\PhpEtl\ChainOperation\ChainOperationInterface;
8
use Oliverde8\PhpEtlBundle\Etl\Operation\Cleanup\DeleteEntityForOldExecutionOperation;
9
10
class DeleteEntityForOldExecutionFactory extends AbstractFactory
11
{
12
    /** @var EntityManagerInterface  */
13
    protected EntityManagerInterface $em;
14
15
    /**
16
     * DeleteEntityForOldExecutionOperation constructor.
17
     * @param EntityManagerInterface $em
18
     */
19
    public function __construct(EntityManagerInterface $em)
20
    {
21
        $this->em = $em;
22
23
        $this->operation = 'Etl/Cleanup/DeleteEntityForOldExecution';
24
        $this->class = DeleteEntityForOldExecutionOperation::class;
25
    }
26
27
    protected function build(string $operation, array $options): ChainOperationInterface
28
    {
29
        return $this->create($this->em);
30
    }
31
}
32