Completed
Push — 57-formatter-per-extension ( 73b3c8 )
by Nicolas
40:17 queued 36:16
created

NullProvider::hasFormatter()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Karma\FormatterProviders;
4
5
use Karma\FormatterProvider;
6
use Karma\Formatters\Raw;
7
8
class NullProvider implements FormatterProvider
9
{
10
    private
11
        $raw;
12
    
13
    public function __construct()
14
    {
15
        $this->raw = new Raw();    
16
    }
17
    
18
    public function hasFormatter($index)
19
    {
20
        return false;
21
    }
22
23
    public function getFormatter($fileExtension, $index = null)
24
    {
25
        return $this->raw;
26
    }
27
}