Completed
Pull Request — master (#16)
by Greg
02:39
created

DefaultFormatter::write()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 2
Bugs 0 Features 2
Metric Value
c 2
b 0
f 2
dl 0
loc 6
ccs 0
cts 5
cp 0
rs 9.4285
cc 2
eloc 3
nc 2
nop 3
crap 6
1
<?php
2
namespace Consolidation\OutputFormatters\Formatters;
3
4
use Consolidation\OutputFormatters\FormatterInterface;
5
use Symfony\Component\Console\Output\OutputInterface;
6
7
class DefaultFormatter implements FormatterInterface
8
{
9
    /**
10
     * @inheritdoc
11
     */
12
    public function write(OutputInterface $output, $data, $options = [])
13
    {
14
        if (is_string($data)) {
15
            $output->writeln($data);
16
        }
17
    }
18
}
19