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

UserWantsDocker::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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