SuggestionResult   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 4
dl 0
loc 52
c 0
b 0
f 0
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getPayload() 0 3 1
A getTerm() 0 3 1
A __construct() 0 5 1
A getWeight() 0 3 1
1
<?php
2
3
namespace Mdiyakov\DoctrineSolrBundle\Query\Suggest\Result;
4
5
class SuggestionResult
6
{
7
    /**
8
     * @var string
9
     */
10
    private $term;
11
12
    /**
13
     * @var float
14
     */
15
    private $weight;
16
17
    /**
18
     * @var string
19
     */
20
    private $payload;
21
22
    /**
23
     * SuggestionResult constructor.
24
     * @param string $term
25
     * @param float $weight
26
     * @param string $payload
27
     */
28
    public function __construct($term, $weight, $payload)
29
    {
30
        $this->term = $term;
31
        $this->weight = $weight;
32
        $this->payload = $payload;
33
    }
34
35
    /**
36
     * @return string
37
     */
38
    public function getTerm()
39
    {
40
        return $this->term;
41
    }
42
43
    /**
44
     * @return float
45
     */
46
    public function getWeight()
47
    {
48
        return $this->weight;
49
    }
50
51
    /**
52
     * @return string
53
     */
54
    public function getPayload()
55
    {
56
        return $this->payload;
57
    }
58
59
}