Completed
Push — dev ( 4deee6...a8b68f )
by Zach
02:10
created

Migrate::getRepository()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 1
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
1
<?php
2
3
namespace Yarak\Commands;
4
5
use Yarak\Migrations\Migrator;
6
use Yarak\Output\SymfonyOutput;
7
use Yarak\DB\Seeders\SeedRunner;
8
use Symfony\Component\Console\Input\InputOption;
9
use Symfony\Component\Console\Input\InputInterface;
10
use Symfony\Component\Console\Output\OutputInterface;
11
12
class Migrate extends YarakCommand
13
{
14
    /**
15
     * Configure the command.
16
     */
17
    protected function configure()
18
    {
19
        $this->setName('migrate')
20
            ->setDescription('Run the database migrations.')
21
            ->setHelp('This command allows you to run migrations.');
22
    }
23
24
    /**
25
     * Execute the command.
26
     *
27
     * @param InputInterface  $input
28
     * @param OutputInterface $output
29
     */
30
    protected function execute(InputInterface $input, OutputInterface $output)
31
    {
32
        $this->getMigrator(new SymfonyOutput($output))->run();
33
    }
34
}
35