oliverde8 /
phpEtlBundle
| 1 | <?php |
||||
| 2 | |||||
| 3 | declare(strict_types=1); |
||||
| 4 | |||||
| 5 | namespace Oliverde8\PhpEtlBundle\Etl\Operation\Cleanup; |
||||
| 6 | |||||
| 7 | use Doctrine\ORM\EntityManagerInterface; |
||||
|
0 ignored issues
–
show
|
|||||
| 8 | use Oliverde8\Component\PhpEtl\ChainOperation\AbstractChainOperation; |
||||
| 9 | use Oliverde8\Component\PhpEtl\Item\DataItemInterface; |
||||
| 10 | use Oliverde8\Component\PhpEtl\Item\ItemInterface; |
||||
| 11 | use Oliverde8\Component\PhpEtl\Model\ExecutionContext; |
||||
| 12 | use Oliverde8\PhpEtlBundle\Entity\EtlExecution; |
||||
| 13 | |||||
| 14 | class DeleteEntityForOldExecutionOperation extends AbstractChainOperation |
||||
| 15 | { |
||||
| 16 | protected EntityManagerInterface $em; |
||||
| 17 | |||||
| 18 | /** |
||||
| 19 | * DeleteEntityForOldExecutionOperation constructor. |
||||
| 20 | * @param EntityManagerInterface $em |
||||
| 21 | */ |
||||
| 22 | public function __construct(EntityManagerInterface $em) |
||||
| 23 | { |
||||
| 24 | $this->em = $em; |
||||
| 25 | } |
||||
| 26 | |||||
| 27 | protected function processData(DataItemInterface $item, ExecutionContext $context): ItemInterface |
||||
|
0 ignored issues
–
show
The parameter
$context is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. Loading history...
|
|||||
| 28 | { |
||||
| 29 | /** @var EtlExecution $entity */ |
||||
| 30 | $entity = $item->getData(); |
||||
| 31 | |||||
| 32 | $this->em->remove($entity); |
||||
| 33 | $this->em->flush(); |
||||
| 34 | // Method is currently deprecated but has been un-deprecated in doctrine 3. |
||||
| 35 | $this->em->detach($entity); |
||||
| 36 | |||||
| 37 | return $item; |
||||
| 38 | } |
||||
| 39 | } |
||||
| 40 |
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths