Completed
Push — master ( ada55e...22327f )
by Julien
11s
created

BaseQuestion::spacer()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace TheAentMachine\Helper;
4
5
use Symfony\Component\Console\Helper\QuestionHelper;
6
use Symfony\Component\Console\Input\InputInterface;
7
use Symfony\Component\Console\Output\OutputInterface;
8
9
abstract class BaseQuestion
10
{
11
    /** @var QuestionHelper */
12
    protected $helper;
13
14
    /** @var InputInterface */
15
    protected $input;
16
17
    /** @var OutputInterface */
18
    protected $output;
19
20
    /** @var string */
21
    protected $question;
22
23
    /** @var string|null */
24
    protected $default;
25
26
    /** @var string|null */
27
    protected $helpText;
28
29
    public function __construct(QuestionHelper $helper, InputInterface $input, OutputInterface $output, string $question)
30
    {
31
        $this->helper = $helper;
32
        $this->input = $input;
33
        $this->output = $output;
34
        $this->question = $question;
35
    }
36
37
    protected function spacer(): void
38
    {
39
        $this->output->writeln('');
40
    }
41
42
    /**
43
     * @param string $default
44
     * @return mixed
45
     */
46
    abstract public function setDefault(string $default);
47
48
    /**
49
     * @param string $helpText
50
     * @return mixed
51
     */
52
    abstract public function setHelpText(string $helpText);
53
54
    /**
55
     * @return mixed
56
     */
57
    abstract public function ask();
58
}
59