HasQuery::setQuery()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 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