Completed
Push — master ( 4deee6...b383ba )
by Zach
05:43 queued 03:44
created

MigrateRollback::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Yarak\Commands;
4
5
use Yarak\Console\YarakCommand;
6
7
class MigrateRollback extends YarakCommand
8
{
9
    /**
10
     * The command signature.
11
     *
12
     * @var string
13
     */
14
    protected $signature = 'migrate:rollback
15
                            {--steps=1 : Number of steps to rollback.}';
16
17
    /**
18
     * The command description.
19
     *
20
     * @var string
21
     */
22
    protected $description = 'Refresh the database.';
23
24
    /**
25
     * Handle the command.
26
     */
27
    protected function handle()
28
    {
29
        $this->getMigrator($this->getOutput())
30
            ->rollback($this->option('steps'));
31
    }
32
}
33