BaseCommand   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 13
ccs 0
cts 5
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A chooseAnOption() 0 4 1
A askForArgument() 0 5 2
1
<?php namespace Packedge\Workbench\Console;
2
3
use Illuminate\Console\Command;
4
5
class BaseCommand extends Command
6
{
7
    public function askForArgument($name, $question)
8
    {
9
        if($value = $this->argument($name)) return $value;
10
        return $this->ask($question);
11
    }
12
13
    public function chooseAnOption($question, array $data)
14
    {
15
        return $this->choice($question, $data);
16
    }
17
}