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

TypeTrait::setType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Digia\GraphQL\Type\Definition;
4
5
trait TypeTrait
6
{
7
8
    /**
9
     * @var TypeInterface
10
     */
11
    private $type;
12
13
    /**
14
     * @return TypeInterface
15
     */
16
    public function getType(): TypeInterface
17
    {
18
        return $this->type;
19
    }
20
21
    /**
22
     * @param TypeInterface $type
23
     * @return $this
24
     */
25
    protected function setType(TypeInterface $type)
26
    {
27
        $this->type = $type;
28
29
        return $this;
30
    }
31
}
32