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

CreateFlightBillTransactionalCommandHandler   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 19
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 12 2
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
}