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