Completed
Push — master ( 83e564...d55deb )
by
unknown
01:32
created

Builder::getKey()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace EnergieProduction\Chart\Criterias;
4
5
use EnergieProduction\Chart\Rendered;
6
use EnergieProduction\Chart\Expression;
7
8
abstract class Builder implements Criteria {
9
10
	protected $content;
11
12
	public function __construct($content)
13
	{
14
		$this->content = $content;
15
	}
16
17
	public function render()
18
	{
19
		$render = new Rendered\Render($this);
20
		$render = new Rendered\Criteria($render);
21
22
	    if ($this->content instanceof Expression) {
23
			$render = new Rendered\Expression($render);
24
	    }
25
26
		return $render->handle($this->content);
27
	}
28
}
29