This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
12
{
13
/**
14
* Constructs a SpanWithin query object.
15
*
16
* @param AbstractSpanQuery $include OPTIONAL
17
* @param AbstractSpanQuery $exclude OPTIONAL
18
*/
19
public function __construct(AbstractSpanQuery $include = null, AbstractSpanQuery $exclude = null)
20
{
21
if (null !== $include) {
22
$this->setInclude($include);
23
}
24
25
if (null !== $exclude) {
26
$this->setExclude($exclude);
27
}
28
}
29
30
/**
31
* @param AbstractSpanQuery $include
32
*
33
* @return $this
34
*/
35
public function setInclude(AbstractSpanQuery $include)
36
{
37
return $this->setParam('include', $include);
38
}
39
40
/**
41
* @param AbstractSpanQuery $exclude
42
*
43
* @return $this
44
*/
45
public function setExclude(AbstractSpanQuery $exclude)
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.