Completed
Pull Request — master (#45)
by Jasper
11:58
created

HasType   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setType() 0 5 1
A getType() 0 3 1
1
<?php
2
3
namespace Swis\JsonApi\Client\Relations\Traits;
4
5
trait HasType
6
{
7
    /**
8
     * @var string
9
     */
10
    protected $type;
11
12
    /**
13
     * @param string $type
14
     *
15
     * @return $this
16
     */
17
    public function setType(string $type)
18
    {
19
        $this->type = $type;
20
21
        return $this;
22
    }
23
24
    /**
25
     * @return string
26
     */
27
    public function getType(): string
28
    {
29
        return $this->type;
30
    }
31
}
32