Completed
Push — master ( 4fb6aa...066340 )
by juan
02:57
created

ConfirmationProccessTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A confirmationProcess() 0 7 2
1
<?php
2
3
namespace Juanber84\Console\Command;
4
5
use Symfony\Component\Console\Question\ConfirmationQuestion;
6
7
trait ConfirmationProccessTrait
8
{
9
    public function confirmationProcess($input, $output, $helper, $message)
10
    {
11
        $question = new ConfirmationQuestion('Continue with this action? <info>Y/n</info> ', true);
12
        if (!$helper->ask($input, $output, $question)) {
13
            return $output->writeln("<fg=blue;>".$message.'</>');
14
        }
15
    }
16
}