Conditions | 4 |
Paths | 6 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
48 | public function release() |
||
49 | { |
||
50 | $exceptions = []; |
||
51 | foreach ($this->locks as $lock) { |
||
52 | try { |
||
53 | $lock->release(); |
||
54 | } catch (RuntimeException $e) { |
||
55 | $exceptions[] = $e; |
||
56 | } |
||
57 | } |
||
58 | if (!empty($exceptions)) { |
||
59 | throw new AggregationException($exceptions, "Some locks were not released"); |
||
60 | } |
||
61 | } |
||
62 | |||
68 |