| Total Complexity | 2 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | use Opulence\Ioc\Bootstrappers\ILazyBootstrapper; |
||
| 13 | use Opulence\Ioc\IContainer; |
||
| 14 | |||
| 15 | class MigrationsBootstrapper extends Bootstrapper implements ILazyBootstrapper |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @return array |
||
| 19 | */ |
||
| 20 | public function getBindings(): array |
||
| 24 | ]; |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param IContainer $container |
||
| 29 | * |
||
| 30 | * @throws \Opulence\Ioc\IocException |
||
| 31 | */ |
||
| 32 | public function registerBindings(IContainer $container) |
||
| 33 | { |
||
| 34 | /** @var IConnection $connection */ |
||
| 35 | $connection = $container->resolve(IConnection::class); |
||
| 36 | |||
| 37 | /** @var IFileFinder $fileFinder */ |
||
| 38 | $fileFinder = $container->resolve(FileFinderBootstrapper::MIGRATION_FILE_FINDER); |
||
| 39 | |||
| 40 | $migration = new Init($connection, $fileFinder); |
||
| 41 | |||
| 42 | $container->bindInstance(Init::class, $migration); |
||
| 45 |