NamedEnumAttributeBuilder   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
c 1
b 0
f 0
dl 0
loc 32
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A idAttribute() 0 4 1
A required() 0 4 1
A namespace() 0 4 1
A defaultValue() 0 4 1
A __construct() 0 3 1
1
<?php
2
3
namespace Xml\Impl\Type\Attribute;
4
5
use Xml\Impl\Type\ModelElementTypeImpl;
6
7
class NamedEnumAttributeBuilder extends AttributeBuilderImpl
8
{
9
    public function __construct(string $attributeName, ModelElementTypeImpl $modelType, string $type)
10
    {
11
        parent::__construct($attributeName, $modelType, new NamedEnumAttribute($modelType, $type));
12
    }
13
14
    public function namespace(string $namespaceUri): NamedEnumAttributeBuilder
15
    {
16
        parent::namespace($namespaceUri);
17
        return $this;
18
    }
19
20
    /**
21
     * @param mixed $defaultValue
22
     */
23
    public function defaultValue($defaultValue): NamedEnumAttributeBuilder
24
    {
25
        parent::defaultValue($defaultValue);
26
        return $this;
27
    }
28
29
    public function required(): NamedEnumAttributeBuilder
30
    {
31
        parent::required();
32
        return $this;
33
    }
34
35
    public function idAttribute(): NamedEnumAttributeBuilder
36
    {
37
        parent::idAttribute();
38
        return $this;
39
    }
40
}
41