| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | 1 | protected function execute(InputInterface $input, OutputInterface $output) |
|
| 22 | { |
||
| 23 | /* @var $em \Doctrine\ORM\EntityManager */ |
||
| 24 | 1 | $em = $this->getContainer()->get('doctrine')->getManager(); |
|
|
|
|||
| 25 | 1 | $driver = $em->getConnection()->getDriver()->getName(); |
|
| 26 | |||
| 27 | |||
| 28 | 1 | if ($driver != "pdo_sqlite") { |
|
| 29 | 1 | $command = $this->getApplication()->find('doctrine:database:create'); |
|
| 30 | 1 | $arguments = array('--if-not-exists' => true); |
|
| 31 | 1 | $inputcmd = new ArrayInput($arguments); |
|
| 32 | 1 | $command->run($inputcmd, $output); |
|
| 33 | } |
||
| 34 | 1 | $command = $this->getApplication()->find('doctrine:schema:create'); |
|
| 35 | 1 | $arguments = array(''); |
|
| 36 | 1 | $inputcmd = new ArrayInput($arguments); |
|
| 37 | 1 | $command->run($inputcmd, $output); |
|
| 38 | 1 | } |
|
| 40 |
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.