HasQuery   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 getQuery() 0 3 1
A setQuery() 0 5 1
1
<?php
2
3
namespace Nord\Lumen\Elasticsearch\Search\Query\Traits;
4
5
use Nord\Lumen\Elasticsearch\Search\Query\QueryDSL;
6
7
/**
8
 * Trait HasQuery
9
 * @package Nord\Lumen\Elasticsearch\Search\Query\Traits
10
 */
11
trait HasQuery
12
{
13
14
    /**
15
     * @var ?QueryDSL
16
     */
17
    protected $query;
18
19
    /**
20
     * @return QueryDSL|null
21
     */
22
    public function getQuery()
23
    {
24
        return $this->query;
25
    }
26
27
    /**
28
     * @param QueryDSL $query
29
     *
30
     * @return $this
31
     */
32
    public function setQuery(QueryDSL $query)
33
    {
34
        $this->query = $query;
35
36
        return $this;
37
    }
38
}
39