Passed
Pull Request — master (#20)
by Christoffer
02:08
created

DescriptionTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 25
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getDescription() 0 3 1
A setDescription() 0 5 1
1
<?php
2
3
namespace Digia\GraphQL\Type\Definition;
4
5
trait DescriptionTrait
6
{
7
8
    /**
9
     * @var ?string
10
     */
0 ignored issues
show
Documentation Bug introduced by
The doc comment ?string at position 0 could not be parsed: Unknown type name '?string' at position 0 in ?string.
Loading history...
11
    private $description;
12
13
    /**
14
     * @return null|string
15
     */
16
    public function getDescription(): ?string
17
    {
18
        return $this->description;
19
    }
20
21
    /**
22
     * @param null|string $description
23
     * @return $this
24
     */
25
    protected function setDescription(?string $description)
26
    {
27
        $this->description = $description;
28
29
        return $this;
30
    }
31
}
32