Completed
Pull Request — develop (#25)
by Sam
03:27 queued 34s
created

HasQuery   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setQuery() 0 5 1
A getQuery() 0 3 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
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($query)
33
    {
34
        $this->query = $query;
35
36
        return $this;
37
    }
38
}
39