PrimitiveRenderer   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

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