Conditions | 4 |
Paths | 5 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
43 | public function onShopDataBeforeSave(LifecycleEventArgs $args) |
||
44 | { |
||
45 | $entity = $args->getObject(); |
||
46 | |||
47 | if ($entity instanceof Shop) { |
||
48 | if (null === $entity->getInvoiceMaturity()) { |
||
49 | $entity->setInvoiceMaturity(7); |
||
50 | } |
||
51 | |||
52 | if (null === $entity->getInvoiceProcessor()) { |
||
53 | $entity->setInvoiceProcessor('generic'); |
||
54 | } |
||
55 | } |
||
56 | } |
||
57 | } |
||
58 |