ImageCollection   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 5
c 1
b 0
f 0
dl 0
loc 10
ccs 5
cts 5
cp 1
rs 10

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;
0 ignored issues
show
Bug introduced by
The type Zenwalker\CommerceML\Model\Image was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
use Zenwalker\CommerceML\Model\Simple;
9
10
/**
11
 * Class Image
12
 *
13
 * @package Zenwalker\CommerceML\Model
14
 */
15
class ImageCollection extends Simple
16
{
17 1
    public function init()
18
    {
19 1
        if ($this->xml) {
20 1
            foreach ($this->xml as $image) {
21 1
                $this->append(new Image($this->owner, $image));
22
            }
23
        }
24 1
        parent::init();
25
    }
26
}