Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 8 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
LocationService | |
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 | |
3 | namespace BO\Zmsdldb\Importer\MySQL\Entity; |
4 | |
5 | class LocationService extends Base |
6 | { |
7 | protected $fieldMapping = [ |
8 | 'location' => 'location_id', |
9 | 'service_id' => 'service_id', |
10 | 'locale' => 'locale', |
11 | 'appointment.slots' => 'appointment_slots', |
12 | 'appointment.link' => 'appointment_link', |
13 | 'appointment.external' => 'appointment_external', |
14 | 'appointment.multiple' => 'appointment_multiple', |
15 | 'appointment.allowed' => 'appointment_bookable', |
16 | 'hint' => 'appointment_note', |
17 | 'contact' => 'contact_json' |
18 | ]; |
19 | |
20 | public function deleteEntity(): bool |
21 | { |
22 | try { |
23 | return $this->deleteWith( |
24 | array_combine( |
25 | ['location_id', 'service_id', 'locale'], |
26 | array_values($this->get(['location', 'service_id', 'locale'])) |
27 | ) |
28 | ); |
29 | } catch (\Exception $e) { |
30 | throw $e; |
31 | } |
32 | } |
33 | } |