NullFormatter   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 50%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 0
cbo 0
dl 0
loc 18
ccs 2
cts 4
cp 0.5
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A format() 0 4 1
A removeFormat() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the webmozart/console package.
5
 *
6
 * (c) Bernhard Schussek <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Webmozart\Console\Formatter;
13
14
use Webmozart\Console\Api\Formatter\Formatter;
15
use Webmozart\Console\Api\Formatter\Style;
16
17
/**
18
 * A formatter that returns all text unchanged.
19
 *
20
 * @since  1.0
21
 *
22
 * @author Bernhard Schussek <[email protected]>
23
 */
24
class NullFormatter implements Formatter
25
{
26
    /**
27
     * {@inheritdoc}
28
     */
29 19
    public function format($string, Style $style = null)
30
    {
31 19
        return $string;
32
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37
    public function removeFormat($string)
38
    {
39
        return $string;
40
    }
41
}
42