BaseCommand::askForArgument()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
ccs 0
cts 3
cp 0
rs 9.4285
cc 2
eloc 3
nc 2
nop 2
crap 6
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
}