HtmlRenderer::handles()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
namespace rtens\domin\delivery\cli\renderers;
3
4
use rtens\domin\delivery\Renderer;
5
use rtens\domin\parameters\Html;
6
7
class HtmlRenderer implements Renderer {
8
9
    /**
10
     * @param mixed $value
11
     * @return bool
12
     */
13
    public function handles($value) {
14
        return $value instanceof Html;
15
    }
16
17
    /**
18
     * @param Html $value
19
     * @return string
20
     */
21
    public function render($value) {
22
        return '(html)' . PHP_EOL . $value->getContent();
23
    }
24
}