Total Complexity | 4 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Coverage | 75% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
11 | trait CanRenderTrait |
||
12 | { |
||
13 | protected $output = null; |
||
14 | |||
15 | /** |
||
16 | * @return string |
||
17 | */ |
||
18 | public function __toString() |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * @return string |
||
25 | */ |
||
26 | 1 | public function output() |
|
27 | { |
||
28 | 1 | if ($this->output === null) { |
|
29 | 1 | $this->output = $this->render(); |
|
30 | } |
||
31 | |||
32 | 1 | return $this->output; |
|
33 | } |
||
34 | |||
35 | /** |
||
36 | * @return string |
||
37 | */ |
||
38 | 1 | protected function render() |
|
41 | } |
||
42 | } |
||
43 |