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

NullProvider   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
c 1
b 0
f 1
lcom 1
cbo 1
dl 0
loc 20
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A hasFormatter() 0 4 1
A getFormatter() 0 4 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
}