Completed
Pull Request — master (#20)
by Christoffer
02:40 queued 53s
created

DefaultValueTrait   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 setDefaultValue() 0 5 1
A getDefaultValue() 0 3 1
1
<?php
2
3
namespace Digia\GraphQL\Type\Definition;
4
5
trait DefaultValueTrait
6
{
7
8
    /**
9
     * @var mixed
10
     */
11
    private $defaultValue;
12
13
    /**
14
     * @return mixed
15
     */
16
    public function getDefaultValue()
17
    {
18
        return $this->defaultValue;
19
    }
20
21
    /**
22
     * @param mixed $defaultValue
23
     * @return $this
24
     */
25
    protected function setDefaultValue($defaultValue)
26
    {
27
        $this->defaultValue = $defaultValue;
28
29
        return $this;
30
    }
31
}
32