| Conditions | 4 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | public function getMigration($class): MigrationInterface |
||
| 31 | { |
||
| 32 | try { |
||
| 33 | $migration = $this->container->get($class); |
||
| 34 | if (!$migration || !$migration instanceof MigrationInterface) { |
||
| 35 | throw new \RuntimeException('Migration must implement ' . MigrationInterface::class); |
||
| 36 | } |
||
| 37 | } catch (\Exception $e) { |
||
| 38 | throw new RuntimeException('Migration instantiate error: ' . $class, 0, $e); |
||
| 39 | } |
||
| 40 | return $migration; |
||
| 41 | } |
||
| 43 |