Completed
Push — master ( aa9657...bb9832 )
by Sebastian
05:21
created

Application   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 29
c 0
b 0
f 0
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setProxyIO() 0 4 1
A getIO() 0 4 1
1
<?php
2
/**
3
 * This file is part of CaptainHook.
4
 *
5
 * (c) Sebastian Feldmann <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace SebastianFeldmann\CaptainHook\Composer;
11
12
use Composer\IO\IOInterface;
13
use SebastianFeldmann\CaptainHook\Console\Application\ConfigHandler;
14
use SebastianFeldmann\CaptainHook\Console\IO\ComposerIO;
15
16
/**
17
 * Class Application
18
 *
19
 * @package CaptainHook
20
 * @author  Sebastian Feldmann <[email protected]>
21
 * @link    https://github.com/sebastianfeldmann/captainhook
22
 * @since   Class available since Release 0.9.0
23
 */
24
class Application extends ConfigHandler
25
{
26
    /**
27
     * Composer IO Proxy
28
     *
29
     * @var \SebastianFeldmann\CaptainHook\Console\IO\ComposerIO
30
     */
31
    protected $io;
32
33
    /**
34
     * Set the composer application IO.
35
     *
36
     * @param  \Composer\IO\IOInterface $io
37
     */
38 2
    public function setProxyIO(IOInterface $io)
39
    {
40 2
        $this->io = new ComposerIO($io);
41 2
    }
42
43
    /**
44
     * IO Getter.
45
     *
46
     * @return \SebastianFeldmann\CaptainHook\Console\IO\ComposerIO
47
     */
48 2
    public function getIO() : ComposerIO
49
    {
50 2
        return $this->io;
51
    }
52
}
53