Completed
Push — develop ( 2faf16...be2583 )
by ANTHONIUS
15s queued 11s
created

IO   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 19
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A hasError() 0 3 1
A setHasError() 0 3 1
A sessionError() 0 5 1
1
<?php
2
3
4
namespace Doyo\Behat\Coverage\Console;
5
6
7
use Symfony\Component\Console\Style\SymfonyStyle;
8
9
class IO extends SymfonyStyle implements ConsoleIO
10
{
11
    private $hasError = false;
12
13 4
    public function setHasError(bool $flag)
14
    {
15 4
        $this->hasError = $flag;
16
    }
17
18 4
    public function hasError(): bool
19
    {
20 4
        return true === $this->hasError;
21
    }
22
23 1
    public function sessionError($sessionName, $message)
24
    {
25 1
        $this->hasError = true;
26 1
        $message = sprintf('<info><comment>sessions.%s</comment> >> %s</info>', $sessionName, $message);
27 1
        $this->writeln($message);
28
    }
29
}
30