Completed
Push — master ( 5db45c...f208af )
by Arthur
02:39
created

AbstractType::setDescription()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 1
Metric Value
c 1
b 1
f 1
dl 0
loc 6
rs 9.4286
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace Arthem\GraphQLMapper\Mapping;
4
5
abstract class AbstractType
6
{
7
    /**
8
     * @var string
9
     */
10
    private $name;
11
12
    /**
13
     * @var string
14
     */
15
    private $description;
16
17
    /**
18
     * @return string
19
     */
20
    public function getName()
21
    {
22
        return $this->name;
23
    }
24
25
    /**
26
     * @param string $name
27
     * @return $this
28
     */
29
    public function setName($name)
30
    {
31
        $this->name = $name;
32
33
        return $this;
34
    }
35
36
    /**
37
     * @return string
38
     */
39
    public function getDescription()
40
    {
41
        return $this->description;
42
    }
43
44
    /**
45
     * @param string $description
46
     * @return $this
47
     */
48
    public function setDescription($description)
49
    {
50
        $this->description = $description;
51
52
        return $this;
53
    }
54
55
    /**
56
     * @return array
57
     */
58
    public function toMapping()
59
    {
60
        return [
61
            'name'        => $this->name,
62
            'description' => $this->description,
63
        ];
64
    }
65
}
66