Passed
Push — master ( b649b5...b34030 )
by Sebastian
04:07
created

NullIO::isInteractive()   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 CaptainHook\Console\IO;
11
12
/**
13
 * Class NullIO
14
 *
15
 * @package CaptainHook
16
 * @author  Sebastian Feldmann <[email protected]>
17
 * @link    https://github.com/sebastianfeldmann/captainhook
18
 * @since   Class available since Release 0.9.0
19
 */
20
class NullIO extends Base
21
{
22
    /**
23
     * {@inheritDoc}
24
     */
25 1
    public function isInteractive()
26
    {
27 1
        return false;
28
    }
29
30
    /**
31
     * {@inheritDoc}
32
     */
33 1
    public function isVerbose()
34
    {
35 1
        return false;
36
    }
37
38
    /**
39
     * {@inheritDoc}
40
     */
41 1
    public function isVeryVerbose()
42
    {
43 1
        return false;
44
    }
45
46
    /**
47
     * {@inheritDoc}
48
     */
49 1
    public function isDebug()
50
    {
51 1
        return false;
52
    }
53
54
    /**
55
     * {@inheritDoc}
56
     */
57 6
    public function write($messages, $newline = true, $verbosity = self::NORMAL)
58
    {
59 6
    }
60
61
    /**
62
     * {@inheritDoc}
63
     */
64 1
    public function writeError($messages, $newline = true, $verbosity = self::NORMAL)
65
    {
66 1
    }
67
68
    /**
69
     * {@inheritDoc}
70
     */
71 2
    public function ask($question, $default = null)
72
    {
73 2
        return $default;
74
    }
75
76
    /**
77
     * {@inheritDoc}
78
     */
79 1
    public function askConfirmation($question, $default = true)
80
    {
81 1
        return $default;
82
    }
83
84
    /**
85
     * {@inheritDoc}
86
     */
87 1
    public function askAndValidate($question, $validator, $attempts = false, $default = null)
88
    {
89 1
        return $default;
90
    }
91
}
92