Completed
Push — dev ( 122982...5e45c8 )
by Zach
02:18
created

MigrateRollback::configure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 10
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 13
rs 9.4285
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