HasType   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
c 1
b 0
f 0
dl 0
loc 26
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getType() 0 3 1
A setType() 0 5 1
1
<?php
2
3
namespace Nord\Lumen\Elasticsearch\Search\Query\Traits;
4
5
/**
6
 * Trait HasType
7
 * @package Nord\Lumen\Elasticsearch\Search\Query\Traits
8
 */
9
trait HasType
10
{
11
12
    /**
13
     * @var ?string
14
     */
15
    private $type;
16
17
    /**
18
     * @return string|null
19
     */
20
    public function getType()
21
    {
22
        return $this->type;
23
    }
24
25
    /**
26
     * @param string $type
27
     *
28
     * @return $this
29
     */
30
    public function setType(string $type)
31
    {
32
        $this->type = $type;
33
34
        return $this;
35
    }
36
}
37