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

MigrateRollback   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 26
rs 10
c 1
b 0
f 0
wmc 1
lcom 1
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 5 1
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