Passed
Push — master ( b4d66c...c4c0f5 )
by Lexey
02:18
created

ComposerIO   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 1
dl 0
loc 39
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A write() 0 4 1
A isInteractive() 0 4 1
A ask() 0 4 1
1
<?php
2
3
namespace LF\EnvDiff\IO;
4
5
use Composer\IO\IOInterface as ComposerIOInterface;
6
7
/**
8
 * @codeCoverageIgnore
9
 */
10
class ComposerIO implements IOInterface
11
{
12
    /** @var ComposerIOInterface */
13
    private $io;
14
15
    /**
16
     * ComposerIO constructor.
17
     *
18
     * @param ComposerIOInterface $io
19
     */
20
    public function __construct(ComposerIOInterface $io)
21
    {
22
        $this->io = $io;
23
    }
24
25
    /**
26
     * {@inheritdoc}
27
     */
28
    public function write($message)
29
    {
30
        $this->io->write($message);
31
    }
32
33
    /**
34
     * {@inheritdoc}
35
     */
36
    public function isInteractive()
37
    {
38
        return $this->io->isInteractive();
39
    }
40
41
    /**
42
     * {@inheritdoc}
43
     */
44
    public function ask($question, $default = null)
45
    {
46
        return $this->ask($question, $default);
47
    }
48
}
49