| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | protected function execute(InputInterface $input, OutputInterface $output) |
||
| 22 | { |
||
| 23 | /* @var $em \Doctrine\ORM\EntityManager */ |
||
| 24 | $em = $this->getContainer()->get('doctrine')->getManager(); |
||
| 25 | $driver = $em->getConnection()->getDriver()->getName(); |
||
| 26 | |||
| 27 | |||
| 28 | if ($driver != "pdo_sqlite") { |
||
| 29 | $command = $this->getApplication()->find('doctrine:database:create'); |
||
| 30 | $arguments = array('--if-not-exists' => true); |
||
| 31 | $inputcmd = new ArrayInput($arguments); |
||
| 32 | $command->run($inputcmd, $output); |
||
| 33 | } |
||
| 34 | $command = $this->getApplication()->find('doctrine:schema:create'); |
||
| 35 | $arguments = array(''); |
||
| 36 | $inputcmd = new ArrayInput($arguments); |
||
| 37 | $command->run($inputcmd, $output); |
||
| 38 | } |
||
| 39 | } |
||
| 40 |