Completed
Push — master ( 81d11b...3691ca )
by Laurent
01:59
created

handle()   A

Complexity

Conditions 2
Paths 3

Size

Total Lines 12
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 8
nc 3
nop 1
dl 0
loc 12
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
require_once __DIR__ . '/CreateFlightBillCommandHandler.php';
4
5
/**
6
 * @author Laurent De Coninck <[email protected]>
7
 */
8
class CreateFlightBillTransactionalCommandHandler extends CreateFlightBillCommandHandler
9
{
10
    /**
11
     * @inheritDoc
12
     */
13
    public function handle(CreateFlightBillCommand $command)
14
    {
15
        $this->db->begin();
16
17
        try {
18
            parent::handle($command);
19
            $this->db->commit();
20
        } catch (\Exception $e) {
21
            $this->db->rollback($e->getTraceAsString());
22
            throw $e;
23
        }
24
    }
25
26
}