TemplatingTxt   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 2
dl 0
loc 13
rs 10

1 Method

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