| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | public function createDatabase() |
||
| 15 | { |
||
| 16 | /** @var ObjectManager[] $managers */ |
||
| 17 | $managers = $this->get('doctrine')->getManagers(); |
||
| 18 | |||
| 19 | foreach ($managers as $manager) { |
||
| 20 | if ($manager instanceof EntityManagerInterface) { |
||
| 21 | $schemaTool = new SchemaTool($manager); |
||
| 22 | $schemaTool->dropDatabase(); |
||
| 23 | $schemaTool->createSchema( |
||
| 24 | $manager->getMetadataFactory()->getAllMetadata() |
||
| 25 | ); |
||
| 30 | } |