Completed
Push — nln-php7 ( 6680df...1a6b54 )
by Nicolas
02:06
created

NullProvider   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 71.43%

Importance

Changes 0
Metric Value
wmc 3
c 0
b 0
f 0
lcom 1
cbo 1
dl 0
loc 20
ccs 5
cts 7
cp 0.7143
rs 10
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Karma\FormatterProviders;
6
7
use Karma\Formatter;
8
use Karma\FormatterProvider;
9
use Karma\Formatters\Raw;
10
11
class NullProvider implements FormatterProvider
12
{
13
    private Raw
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected T_STRING, expecting T_FUNCTION or T_CONST
Loading history...
14
        $raw;
15
16 76
    public function __construct()
17
    {
18 76
        $this->raw = new Raw();
19 76
    }
20
21
    public function hasFormatter(?string $index): bool
22
    {
23
        return false;
24
    }
25
26 52
    public function getFormatter(?string $fileExtension, ?string $index = null): Formatter
27
    {
28 52
        return $this->raw;
29
    }
30
}
31