Passed
Push — master ( 1cde7b...7c9c8d )
by Aleksandr
08:27
created

SpecificationCollection   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
eloc 5
dl 0
loc 10
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
4
namespace Zenwalker\CommerceML\Collections;
5
6
7
use Zenwalker\CommerceML\Model\Simple;
8
9
/**
10
 * Class SpecificationCollection
11
 *
12
 * @package Zenwalker\CommerceML\Model
13
 */
14
class SpecificationCollection extends Simple
15
{
16 1
    public function init()
17
    {
18 1
        if (isset($this->xml->ХарактеристикаТовара)) {
0 ignored issues
show
Bug introduced by
A parse error occurred: Syntax error, unexpected T_LNUMBER, expecting T_STRING or T_VARIABLE or '{' or '$' on line 18 at column 30
Loading history...
19 1
            foreach ($this->xml->ХарактеристикаТовара as $specification) {
20 1
                $this->append(new Simple($this->owner, $specification));
21
            }
22
        }
23 1
        parent::init();
24
    }
25
}