NullIO::writeError()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 0
c 0
b 0
f 0
dl 0
loc 2
ccs 1
cts 1
cp 1
rs 10
cc 1
nc 1
nop 3
crap 1
1
<?php
2
3
/**
4
 * This file is part of CaptainHook
5
 *
6
 * (c) Sebastian Feldmann <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace CaptainHook\App\Console\IO;
13
14
/**
15
 * Class NullIO
16
 *
17
 * @package CaptainHook
18
 * @author  Sebastian Feldmann <[email protected]>
19
 * @link    https://github.com/captainhook-git/captainhook
20
 * @since   Class available since Release 0.9.0
21
 */
22
class NullIO extends Base
23
{
24
    /**
25
     * {@inheritDoc}
26
     */
27 2
    public function isInteractive()
28
    {
29 2
        return false;
30
    }
31
32
    /**
33
     * {@inheritDoc}
34
     */
35 2
    public function isVerbose()
36
    {
37 2
        return false;
38
    }
39
40
    /**
41
     * {@inheritDoc}
42
     */
43 2
    public function isVeryVerbose()
44
    {
45 2
        return false;
46
    }
47
48
    /**
49
     * {@inheritDoc}
50
     */
51 2
    public function isDebug()
52
    {
53 2
        return false;
54
    }
55
56
    /**
57
     * {@inheritDoc}
58
     */
59 31
    public function write($messages, $newline = true, $verbosity = self::NORMAL)
60
    {
61 31
    }
62
63
    /**
64
     * {@inheritDoc}
65
     */
66 1
    public function writeError($messages, $newline = true, $verbosity = self::NORMAL)
67
    {
68 1
    }
69
70
    /**
71
     * {@inheritDoc}
72
     */
73 4
    public function ask($question, $default = null)
74
    {
75 4
        return (string) $default;
76
    }
77
78
    /**
79
     * {@inheritDoc}
80
     */
81 2
    public function askConfirmation($question, $default = true)
82
    {
83 2
        return $default;
84
    }
85
86
    /**
87
     * {@inheritDoc}
88
     */
89 2
    public function askAndValidate($question, $validator, $attempts = null, $default = null)
90
    {
91 2
        return $default;
92
    }
93
}
94