Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 2.7462 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | 1 | public function setLock(int $batchGroupId, LockTypeEnum $type): void |
|
20 | { |
||
21 | 1 | $result = @touch($this->getLockPath($batchGroupId, $type)); |
|
22 | |||
23 | 1 | if ($result === false) { |
|
24 | throw new RuntimeException(sprintf( |
||
25 | 'lock with batchGroupId "%d" of type "%d" could not be created', |
||
26 | $type->value, |
||
27 | $batchGroupId |
||
28 | )); |
||
70 |