Completed
Push — master ( 98be7b...7a3330 )
by Dorian
01:30
created

NullUserInterface::indent()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 3
1
<?php declare(strict_types=1);
2
3
namespace App\UI;
4
5
final class NullUserInterface implements UserInterface
6
{
7
    /** @var bool */
8
    private $dryRun;
9
10
    /**
11
     * @param bool $dryRun
12
     */
13
    public function __construct(bool $dryRun)
14
    {
15
        $this->dryRun = $dryRun;
16
    }
17
18
    /**
19
     * {@inheritdoc}
20
     */
21
    public function isInteractive(): bool
22
    {
23
        return false;
24
    }
25
26
    /**
27
     * @return bool
28
     */
29
    public function isDryRun(): bool
30
    {
31
        return $this->dryRun;
32
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37
    public function write($messages, bool $newLine = false): void
38
    {
39
    }
40
41
    /**
42
     * {@inheritdoc}
43
     */
44
    public function writeln($messages, int $options = 0): void
45
    {
46
    }
47
48
    /**
49
     * {@inheritdoc}
50
     */
51
    public function listing(array $messages, int $indentation = 0): void
52
    {
53
    }
54
55
    /**
56
     * {@inheritdoc}
57
     */
58
    public function forceOutput(callable $callable): void
59
    {
60
    }
61
62
    /**
63
     * {@inheritdoc}
64
     */
65
    public function indent(int $indentation = 1, int $characters = 2, string $character = ' '): string
66
    {
67
        return '';
68
    }
69
70
    /**
71
     * {@inheritdoc}
72
     */
73
    public function confirm(bool $confirmationDefault = true): bool
74
    {
75
        return true;
76
    }
77
78
    /**
79
     * {@inheritdoc}
80
     */
81
    public function logError(string $error, array &$errors): void
82
    {
83
    }
84
85
    /**
86
     * {@inheritdoc}
87
     */
88
    public function displayErrors(array $errors, string $process, string $type = 'error', int $indentation = 0): void
89
    {
90
    }
91
}
92