Completed
Push — master ( da8fcc...d64df6 )
by Asmir
02:56
created

BaseComplexType   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 16
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A addAttribute() 0 4 1
A getAttributes() 0 4 1
1
<?php
2
namespace GoetasWebservices\XML\XSDReader\Schema\Type;
3
4
use GoetasWebservices\XML\XSDReader\Schema\Inheritance\Extension;
5
use GoetasWebservices\XML\XSDReader\Schema\Inheritance\Restriction;
6
use GoetasWebservices\XML\XSDReader\Schema\Attribute\AttributeItem;
7
use GoetasWebservices\XML\XSDReader\Schema\Attribute\AttributeContainer;
8
9
abstract class BaseComplexType extends Type implements AttributeContainer
10
{
11
12
    protected $attributes = array();
13
14 39
    public function addAttribute(AttributeItem $attribute)
15
    {
16 39
        $this->attributes[] = $attribute;
17 39
    }
18
19
20 5
    public function getAttributes()
21
    {
22 5
        return $this->attributes;
23
    }
24
}
25