Completed
Pull Request — master (#18)
by SignpostMarv
03:00
created

BaseComplexType   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

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