HasTieBreaker   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getTieBreaker() 0 3 1
A setTieBreaker() 0 5 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