Completed
Push — master ( 4bb4eb...402013 )
by Arthur
03:35
created

Type   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 64
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 5
Bugs 1 Features 1
Metric Value
wmc 5
c 5
b 1
f 1
lcom 1
cbo 1
dl 0
loc 64
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getExtends() 0 4 1
A setExtends() 0 6 1
A getValues() 0 4 1
A setValues() 0 7 1
A toMapping() 0 9 1
1
<?php
2
3
namespace Arthem\GraphQLMapper\Mapping;
4
5
class Type extends FieldContainer
6
{
7
    /**
8
     * @var string
9
     */
10
    private $extends;
11
12
    /**
13
     * @var array
14
     */
15
    private $values;
16
17
    /**
18
     * @return string
19
     */
20
    public function getExtends()
21
    {
22
        return $this->extends;
23
    }
24
25
    /**
26
     * @param string $extends
27
     * @return $this
28
     */
29
    public function setExtends($extends)
30
    {
31
        $this->extends = $extends;
32
33
        return $this;
34
    }
35
36
    /**
37
     * @return array
38
     */
39
    public function getValues()
40
    {
41
        return $this->values;
42
    }
43
44
    /**
45
     * @param array $values
46
     * @return $this
47
     */
48
    public function setValues(array $values)
49
    {
50
        $this->values = $values;
51
        $this->setInternalType('EnumType');
52
53
        return $this;
54
    }
55
56
    /**
57
     * {@inheritdoc}
58
     */
59
    public function toMapping()
60
    {
61
        $mapping = parent::toMapping();
62
63
        $mapping['extends'] = $this->extends;
64
        $mapping['values'] = $this->values;
65
66
        return $mapping;
67
    }
68
}
69