| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | private function acquire(array $identifierParts, float $ttl = 360.0): bool |
||
| 26 | { |
||
| 27 | if ($this->lockFactory === null) { |
||
| 28 | return true; |
||
| 29 | } |
||
| 30 | |||
| 31 | $this->lock = $this->lockFactory->create($identifierParts, $ttl); |
||
| 32 | |||
| 33 | if (!$this->lock->acquire()) { |
||
| 34 | $this->lock = null; |
||
| 35 | return false; |
||
| 36 | } |
||
| 37 | |||
| 38 | return true; |
||
| 39 | } |
||
| 54 |