Passed
Push — master ( d6e98a...6cf9ac )
by Daniel
01:52
created

UnderscoreToSpaceFormatter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 9
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php declare(strict_types=1);
2
3
/**
4
 * This file is part of the Csv-Machine package.
5
 *
6
 * (c) Dan McAdams <[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 RoadBunch\Csv\Formatter;
13
14
15
/**
16
 * Class UnderscoreToSpaceFormatter
17
 *
18
 * @author  Dan McAdams
19
 * @package RoadBunch\Csv\Formatters
20
 */
21
class UnderscoreToSpaceFormatter extends Formatter
22
{
23
    /**
24
     * UnderscoreToSpaceFormatter constructor.
25
     */
26
    public function __construct()
27
    {
28 3
        parent::__construct(function ($var) {
29 2
            return str_replace('_', ' ', $var);
30 3
        });
31 3
    }
32
}
33