Passed
Branch 1.0.x (7d3940)
by Koldo
02:45
created

UserWantsDocker   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 15
ccs 7
cts 7
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A ask() 0 5 1
A __construct() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Antidot\Installer\Question;
6
7
use Composer\IO\IOInterface;
8
9
class UserWantsDocker
10
{
11
12
    private IOInterface $io;
13
14 3
    public function __construct(IOInterface $io)
15
    {
16 3
        $this->io = $io;
17 3
    }
18
19 2
    public function ask(): bool
20
    {
21 2
        return $this->io->askConfirmation(
22 2
            'Do you want to install pre-configured Docker environment? [Y/<info>N</info>]',
23 2
            false
24
        );
25
    }
26
}
27