FormatterAwareTrait   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
c 0
b 0
f 0
lcom 1
cbo 0
dl 0
loc 19
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setFormatter() 0 4 1
A getFormatter() 0 4 1
A isHumanReadable() 0 4 2
1
<?php
2
namespace Consolidation\OutputFormatters\Formatters;
3
4
trait FormatterAwareTrait
5
{
6
    protected $formatter;
7
8
    public function setFormatter(FormatterInterface $formatter)
9
    {
10
        $this->formatter = $formatter;
11
    }
12
13
    public function getFormatter()
14
    {
15
        return $this->formatter;
16
    }
17
18
    public function isHumanReadable()
19
    {
20
        return $this->formatter && $this->formatter instanceof \Consolidation\OutputFormatters\Formatters\HumanReadableFormat;
21
    }
22
}
23