Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | public function run($id = null, callable $callback = null) |
||
16 | { |
||
17 | $run = $callback ?? [$this, 'parent::run']; |
||
18 | $args = array_filter([$id]); |
||
19 | |||
20 | if (!$this->enableTransaction) { |
||
21 | return call_user_func_array($run, $args); |
||
22 | } |
||
23 | |||
24 | return DbHelper::transaction($run, $args, $this->getDb()); |
||
25 | } |
||
35 |