| Conditions | 3 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | protected function doAcquireLock(string $name): bool |
||
| 25 | { |
||
| 26 | $lockFileName = $this->getLockFileName($name); |
||
| 27 | $lockLabel = $this->getLockLabel(); |
||
| 28 | |||
| 29 | if ($this->connectionAdapter->exists($lockFileName)) |
||
| 30 | { |
||
| 31 | return false; |
||
| 32 | } |
||
| 33 | |||
| 34 | $this->connectionAdapter->write($lockFileName, $lockLabel); |
||
| 35 | |||
| 36 | return true; |
||
| 37 | } |
||
| 49 |