| Conditions | 2 |
| Paths | 2 |
| Total Lines | 7 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 32 | 2 | public function onMigrationsMigrating(): void |
|
| 33 | { |
||
| 34 | 2 | $this->lock = $this->locker->createLock(self::MIGRATIONS_LOCK_NAME, self::MIGRATIONS_LOCK_TTL); |
|
| 35 | 2 | $migrationInProgress = ! $this->lock->acquire(); |
|
| 36 | |||
| 37 | 2 | if ($migrationInProgress) { |
|
| 38 | 1 | throw MigrationsException::migrationInProgress(); |
|
| 39 | } |
||
| 47 |