| Conditions | 2 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function register(ContainerInterface $app) |
||
| 19 | { |
||
| 20 | $app->closure(Manager::class, function () { |
||
| 21 | $manager = new Manager(); |
||
| 22 | foreach (config('database.connections', []) as $name => $connection) { |
||
| 23 | $manager->connect($connection, $name); |
||
| 24 | } |
||
| 25 | return $manager; |
||
| 26 | }); |
||
| 27 | $app->alias('database', Manager::class); |
||
| 28 | $app->closure(ConnectionInterface::class, function (Manager $manager) { |
||
| 29 | return $manager->getConnection(); |
||
| 30 | }); |
||
| 31 | $app->alias('connection', ConnectionInterface::class); |
||
| 32 | |||
| 33 | $app->bind(MigrateTemplateInterface::class, MigrateTemplate::class); |
||
| 34 | $app->bind(MigrateAdapterInterface::class, MigrateAdapter::class); |
||
| 35 | } |
||
| 36 | |||
| 44 |