Conditions | 2 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | 2 | public static function transaction(callable $callback, array $parameters = [], ?Connection $db = null, ?string $isolationLevel = null) |
|
20 | { |
||
21 | 2 | $db = $db ?? Yii::$app->getDb(); |
|
22 | 2 | $transaction = $db->beginTransaction($isolationLevel); |
|
23 | try { |
||
24 | 2 | $result = call_user_func_array($callback, $parameters); |
|
25 | |||
26 | 1 | $transaction->commit(); |
|
27 | |||
28 | 1 | return $result; |
|
29 | 1 | } catch (\Throwable $e) { |
|
30 | 1 | Yii::error($e, __METHOD__); |
|
31 | 1 | $transaction->rollBack(); |
|
32 | 1 | throw $e; |
|
33 | } |
||
36 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths