Completed
Pull Request — master (#1036)
by
unknown
01:56
created

PingDoctrineCommand::configure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Doctrine\Bundle\DoctrineBundle\Command\Proxy;
4
5
use Doctrine\DBAL\Tools\Console\Command\PingCommand;
6
use Symfony\Component\Console\Input\InputInterface;
7
use Symfony\Component\Console\Input\InputOption;
8
use Symfony\Component\Console\Output\OutputInterface;
9
10
/**
11
 * Ping the database to check its accessible.
12
 */
13
class PingDoctrineCommand extends PingCommand
14
{
15
    /**
16
     * {@inheritdoc}
17
     */
18
    protected static $defaultName = 'doctrine:ping';
19
20
    /**
21
     * {@inheritDoc}
22
     */
23
    protected function configure()
24
    {
25
        parent::configure();
26
27
        $this
28
            ->addOption('connection', null, InputOption::VALUE_OPTIONAL, 'The connection to use for this command');
29
    }
30
31
    /**
32
     * {@inheritDoc}
33
     */
34
    protected function execute(InputInterface $input, OutputInterface $output)
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
35
    {
36
        DoctrineCommandHelper::setApplicationConnection($this->getApplication(), $input->getOption('connection'));
37
38
        return parent::execute($input, $output);
39
    }
40
}
41