Completed
Push — master ( f5e740...967473 )
by Florian
02:51
created

Correction::setHits()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of the Stinger Entity Search package.
5
 *
6
 * (c) Oliver Kotte <[email protected]>
7
 * (c) Florian Meyer <[email protected]>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
namespace StingerSoft\EntitySearchBundle\Model\Result;
13
14
/**
15
 * POPO containing suggestions to redefine the query (like "Did you mean?" from google)
16
 */
17
class Correction {
18
19
	/**
20
	 * The corrected query
21
	 *
22
	 * @var string
23
	 */
24
	protected $query;
25
26
	/**
27
	 * The amount of hit for the corrected query.
28
	 * <code>NULL</code> if the search service cannot predict it
29
	 *
30
	 * @var integer
31
	 */
32
	protected $hits;
33
34
	/**
35
	 * Gets the corrected query
36
	 *
37
	 * @return string
38
	 */
39
	public function getQuery() {
40
		return $this->query;
41
	}
42
43
	/**
44
	 * Sets the corrected query
45
	 *
46
	 * @param string $query        	
47
	 * @return \Model\Result\Correction
48
	 */
49
	public function setQuery($query) {
50
		$this->query = $query;
51
		return $this;
52
	}
53
54
	/**
55
	 * Gets the amount of hit for the corrected query.
56
	 * <code>NULL</code> if the search service cannot predict it
57
	 *
58
	 * @return number
59
	 */
60
	public function getHits() {
61
		return $this->hits;
62
	}
63
64
	/**
65
	 * Sets the amount of hit for the corrected query.
66
	 * <code>NULL</code> if the search service cannot predict it
67
	 *
68
	 * @param integer $hits        	
69
	 * @return \Model\Result\Correction
70
	 */
71
	public function setHits($hits) {
72
		$this->hits = $hits;
73
		return $this;
74
	}
75
}
76
77