Lines 0.00% 0 / 8
Functions and Methods 0.00% 0 / 1
Classes and Traits 0.00% 0 / 1
Name Lines Functions and Methods CRAP Classes and Traits
TopicService 0.00% 0 / 8 0.00% 0 / 1 6 0.00% 0 / 1
 deleteEntity 0.00% 0 / 8 0.00% 0 / 1 6
1<?php
2
3namespace BO\Zmsdldb\Importer\MySQL\Entity;
4
5class TopicService extends Base
6{
7    protected array $fieldMapping = [
8        'id' => 'service_id',
9        'topic_id' => 'topic_id',
10    ];
11
12    #[\Override]
13    public function deleteEntity(): void
14    {
15        try {
16            $this->deleteWith(
17                array_combine(
18                    ['topic_id', 'service_id'],
19                    array_values($this->get('topic_id', 'id'))
20                )
21            );
22        } catch (\Exception $e) {
23            throw $e;
24        }
25    }
26}