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

Application::getIO()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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