Completed
Pull Request — master (#4)
by Alessandro
15:15 queued 12:50
created

CreateDatabaseCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 2
c 2
b 1
f 0
lcom 0
cbo 2
dl 0
loc 27
ccs 0
cts 16
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 13 1
A execute() 0 4 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Facile\MongoDbBundle\Commands;
6
7
use Symfony\Component\Console\Input\InputInterface;
8
use Symfony\Component\Console\Input\InputOption;
9
use Symfony\Component\Console\Output\OutputInterface;
10
11
/**
12
 * Class CreateDatabaseCommand.
13
 */
14
class CreateDatabaseCommand extends AbstractClientCommand
15
{
16
    /**
17
     * {@inheritdoc}
18
     */
19
    protected function configure()
20
    {
21
        parent::configure();
22
        $this
23
            ->setName('mongodb:database:create')
24
            ->setDescription('Creates the configured database')
25
            ->addOption(
26
                'if-not-exists',
27
                null,
28
                InputOption::VALUE_NONE,
29
                'Don\'t trigger an error, when the database already exists'
30
            );
31
    }
32
33
    /**
34
     * {@inheritdoc}
35
     */
36
    protected function execute(InputInterface $input, OutputInterface $output)
37
    {
38
        // WTF NO API TO CREATE ?
39
    }
40
}