TemplatingTxt::render()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 10
rs 9.4285
nc 2
cc 2
eloc 6
nop 0
1
<?php
2
3
namespace Structural\Decorator;
4
5
class TemplatingTxt extends Decorator
6
{
7
    public function render()
8
    {
9
        $data = $this->origin->render();
10
        $return = '';
11
        foreach ($data as $key => $value) {
12
            $return .= "$key: $value\n";
13
        }
14
15
        return $return;
16
    }
17
}
18