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

NullIO   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 72
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 9
lcom 0
cbo 1
dl 0
loc 72
c 0
b 0
f 0
ccs 18
cts 18
cp 1
rs 10

9 Methods

Rating   Name   Duplication   Size   Complexity  
A isInteractive() 0 4 1
A isVerbose() 0 4 1
A isVeryVerbose() 0 4 1
A isDebug() 0 4 1
A write() 0 3 1
A writeError() 0 3 1
A ask() 0 4 1
A askConfirmation() 0 4 1
A askAndValidate() 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 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