Passed
Push — master ( 191f59...1ee7f2 )
by Aleksandr
01:40
created

ImageCollection   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 Method

Rating   Name   Duplication   Size   Complexity  
A init() 0 8 3
1
<?php
2
3
4
namespace Zenwalker\CommerceML\Collections;
5
6
7
use Zenwalker\CommerceML\Model\Image;
8
use Zenwalker\CommerceML\Model\Simple;
9
10
/**
11
 * Class Image
12
 *
13
 * @package Zenwalker\CommerceML\Model
14
 * @property string path
15
 * @property string caption
16
 */
17
class ImageCollection extends Simple
18
{
19 1
    public function init()
20
    {
21 1
        if ($this->xml) {
22 1
            foreach ($this->xml as $image) {
23 1
                $this->append(new Image($this->owner, $image));
24
            }
25
        }
26 1
        parent::init();
27
    }
28
}