Completed
Pull Request — master (#13)
by Robbie
01:51
created

BuildCommand::configure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

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 4
nc 1
nop 0
1
<?php
2
3
namespace SilverLeague\Console\Command\Dev;
4
5
use SilverLeague\Console\Command\SilverStripeCommand;
6
use SilverStripe\ORM\DatabaseAdmin;
7
use Symfony\Component\Console\Input\InputInterface;
8
use Symfony\Component\Console\Output\OutputInterface;
9
10
/**
11
 * The BuildCommand will trigger SilverStripe's database rebuild operation
12
 *
13
 * @package silverstripe-console
14
 * @author  Robbie Averill <[email protected]>
15
 */
16
class BuildCommand extends SilverStripeCommand
17
{
18
    /**
19
     * {@inheritDoc}
20
     */
21
    protected function configure()
22
    {
23
        $this
24
            ->setName('dev:build')
25
            ->setDescription('Builds the SilverStripe database');
26
    }
27
28
    /**
29
     * {@inheritDoc}
30
     * @param InputInterface $input
31
     * @param OutputInterface $output
32
     */
33
    protected function execute(InputInterface $input, OutputInterface $output)
34
    {
35
        (new DatabaseAdmin)->build();
36
    }
37
}
38