Generic   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 10 2
1
<?php
2
3
namespace PeterColes\XmlSoccer\Converters\Objects;
4
5
use stdClass;
6
use SimpleXMLElement;
7
8
class Generic
9
{
10
    public function handle(SimpleXMLElement $item)
11
    {
12
        $object = new stdClass;
13
14
        foreach ($item as $child) {
15
            $object->{$child->getName()} = (string) $child;
16
        }
17
18
        return $object;
19
    }
20
}
21