Completed
Pull Request — master (#7)
by
unknown
05:22
created

TasteConverter::toHtml()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace Sioen\JsonToHtml;
4
5
final class TasteConverter implements Converter
6
{
7
    public function toHtml(array $data)
8
    {
9
        $html = '<p><strong>Taste</strong></p>'.$data['text'];
10
        return $html;
11
    }
12
13
    public function matches($type)
14
    {
15
        return $type === 'taste';
16
    }
17
}
18