Completed
Pull Request — master (#45)
by Jasper
11:05 queued 08:33
created

HasType::setType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 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 60
    public function setType(string $type)
18
    {
19 60
        $this->type = $type;
20
21 60
        return $this;
22
    }
23
24
    /**
25
     * @return string
26
     */
27 25
    public function getType(): string
28
    {
29 25
        return $this->type;
30
    }
31
}
32