PrimitiveRenderer::render()   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
6
class PrimitiveRenderer implements Renderer {
7
8
    /**
9
     * @param mixed $value
10
     * @return bool
11
     */
12
    public function handles($value) {
13
        return !is_object($value) && !is_array($value);
14
    }
15
16
    /**
17
     * @param string $value
18
     * @return string
19
     */
20
    public function render($value) {
21
        return $value;
22
    }
23
}