HtmlRenderer   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 18
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A handles() 0 3 1
A render() 0 3 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
}