Labels   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 20
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A createFromXML() 0 12 3
1
<?php
2
3
namespace Bpost\BpostApiClient\Bpost;
4
5
/**
6
 * Class Labels
7
 */
8
class Labels
9
{
10
    /**
11
     * @param \SimpleXMLElement $xml
12
     *
13
     * @return Label[]
14
     */
15 1
    public static function createFromXML(\SimpleXMLElement $xml)
16
    {
17 1
        $labels = array();
18
19 1
        if (isset($xml->label)) {
20 1
            foreach ($xml->label as $label) {
21 1
                $labels[] = Label::createFromXML($label);
22 1
            }
23 1
        }
24
25 1
        return $labels;
26
    }
27
}
28