NameProjectTrait   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getNameOfProject() 0 11 3
1
<?php
2
3
namespace Juanber84\Console\Command;
4
5
use Symfony\Component\Console\Question\Question;
6
7
trait NameProjectTrait
8
{
9
    private function getNameOfProject($input, $output, $helper, $nameOfProject)
10
    {
11
        if (!$nameOfProject) {
12
            $question = new Question('<question>What is the project key?</question>: ');
13
            do {
14
                $nameOfProject = trim($helper->ask($input, $output, $question));
15
            } while (empty($nameOfProject));
16
        }
17
18
        return $nameOfProject;
19
    }
20
21
}