Passed
Push — php-7.1 ( b6da63...280be0 )
by SignpostMarv
01:58
created

BaseComplexType   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 18
ccs 7
cts 7
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A addAttributeFromAttributeOrRef() 0 14 1
1
<?php
2
declare(strict_types = 1);
3
namespace GoetasWebservices\XML\XSDReader\Schema\Type;
4
5
use DOMElement;
6
use GoetasWebservices\XML\XSDReader\SchemaReader;
7
use GoetasWebservices\XML\XSDReader\Schema\Inheritance\Extension;
8
use GoetasWebservices\XML\XSDReader\Schema\Inheritance\Restriction;
9
use GoetasWebservices\XML\XSDReader\Schema\Attribute\Attribute;
10
use GoetasWebservices\XML\XSDReader\Schema\Attribute\AttributeItem;
11
use GoetasWebservices\XML\XSDReader\Schema\Attribute\AttributeContainer;
12
use GoetasWebservices\XML\XSDReader\Schema\Attribute\AttributeContainerTrait;
13
use GoetasWebservices\XML\XSDReader\Schema\Schema;
14
15
abstract class BaseComplexType extends Type implements AttributeContainer
16
{
17
    use AttributeContainerTrait;
18
19 45
    public function addAttributeFromAttributeOrRef(
20
        SchemaReader $reader,
21
        DOMElement $childNode,
22
        Schema $schema,
23
        DOMElement $node
24
    ) : void {
25 45
        $attribute = Attribute::getAttributeFromAttributeOrRef(
26 45
            $reader,
27 45
            $childNode,
28 45
            $schema,
29 45
            $node
30
        );
31
32 45
        $this->addAttribute($attribute);
33 45
    }
34
}
35