HasTieBreaker::setTieBreaker()   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\Traits;
4
5
/**
6
 * Trait HasTieBreaker
7
 * @package Nord\Lumen\Elasticsearch\Search\Traits
8
 */
9
trait HasTieBreaker
10
{
11
12
    /**
13
     * @var ?float
14
     */
15
    protected $tieBreaker;
16
17
    /**
18
     * @param float $tieBreaker
19
     *
20
     * @return $this
21
     */
22
    public function setTieBreaker(float $tieBreaker)
23
    {
24
        $this->tieBreaker = $tieBreaker;
25
26
        return $this;
27
    }
28
29
    /**
30
     * @return float|null
31
     */
32
    public function getTieBreaker(): ?float
33
    {
34
        return $this->tieBreaker;
35
    }
36
}
37