HasField::setField()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 5
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Nord\Lumen\Elasticsearch\Search\Traits;
4
5
/**
6
 * Trait HasField
7
 * @package Nord\Lumen\Elasticsearch\Search\Traits
8
 */
9
trait HasField
10
{
11
12
    /**
13
     * @var string The field in the index to query on.
14
     */
15
    protected $field;
16
17
    /**
18
     * @return string
19
     */
20
    public function getField()
21
    {
22
        return $this->field;
23
    }
24
25
    /**
26
     * @param string $field
27
     *
28
     * @return $this
29
     */
30
    public function setField($field)
31
    {
32
        $this->field = $field;
33
34
        return $this;
35
    }
36
}
37