RollbackCommand   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getArguments() 0 6 1
A getOptions() 0 6 1
1
<?php
2
3
/*
4
 * This file is part of Rocketeer
5
 *
6
 * (c) Maxime Fabre <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 *
11
 */
12
13
namespace Rocketeer\Console\Commands;
14
15
use Symfony\Component\Console\Input\InputArgument;
16
use Symfony\Component\Console\Input\InputOption;
17
18
/**
19
 * Rollback to the previous release, or to a specific one.
20
 */
21
class RollbackCommand extends BaseTaskCommand
22
{
23
    /**
24
     * Get the console command arguments.
25
     *
26
     * @return string[][]
27
     */
28
    protected function getArguments()
29
    {
30
        return [
31
            ['release', InputArgument::OPTIONAL, 'The release to rollback to'],
32
        ];
33
    }
34
35
    /**
36
     * Get the console command options.
37
     *
38
     * @return array<string[]|array<string|null>>
39
     */
40
    protected function getOptions()
41
    {
42
        return array_merge(parent::getOptions(), [
43
            ['list', 'L', InputOption::VALUE_NONE, 'Shows the available releases to rollback to'],
44
        ]);
45
    }
46
}
47