InfoDoctrineCommand::execute()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
3
/*
4
 * This file is part of the Doctrine Bundle
5
 *
6
 * The code was originally distributed inside the Symfony framework.
7
 *
8
 * (c) Fabien Potencier <[email protected]>
9
 * (c) Doctrine Project, Benjamin Eberlei <[email protected]>
10
 *
11
 * For the full copyright and license information, please view the LICENSE
12
 * file that was distributed with this source code.
13
 */
14
15
namespace Saxulum\DoctrineOrmCommands\Command\Proxy;
16
17
use Doctrine\ORM\Tools\Console\Command\InfoCommand;
18
use Symfony\Component\Console\Input\InputOption;
19
use Symfony\Component\Console\Input\InputInterface;
20
use Symfony\Component\Console\Output\OutputInterface;
21
22
/**
23
 * Show information about mapped entities
24
 *
25
 * @author Benjamin Eberlei <[email protected]>
26
 */
27
class InfoDoctrineCommand extends InfoCommand
28
{
29
    /**
30
     * {@inheritDoc}
31
     */
32
    protected function configure()
33
    {
34
        $this
35
            ->setName('doctrine:mapping:info')
36
            ->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command');
37
    }
38
39
    /**
40
     * {@inheritDoc}
41
     */
42
    protected function execute(InputInterface $input, OutputInterface $output)
43
    {
44
        DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em'));
45
46
        parent::execute($input, $output);
47
    }
48
}
49