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

MigrateReset::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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