Completed
Push — master ( dbdc32...0d10e3 )
by Nicolas
02:23
created

SpanContaining::setBig()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 4
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
namespace Elastica\Query;
3
4
/**
5
 * SpanContaining query.
6
 *
7
 * @author Alessandro Chitolina <[email protected]>
8
 *
9
 * @link https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-span-containing-query.html
10
 */
11 View Code Duplication
class SpanContaining extends AbstractSpanQuery
0 ignored issues
show
Duplication introduced by
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 SpanContaining query object.
15
     *
16
     * @param AbstractSpanQuery $little OPTIONAL
17
     * @param AbstractSpanQuery $big OPTIONAL
18
     */
19
    public function __construct(AbstractSpanQuery $little = null, AbstractSpanQuery $big = null)
20
    {
21
        if (null !== $little) {
22
            $this->setLittle($little);
23
        }
24
25
        if (null !== $big) {
26
            $this->setBig($big);
27
        }
28
    }
29
30
    /**
31
     * @param AbstractSpanQuery $little
32
     *
33
     * @return $this
34
     */
35
    public function setLittle(AbstractSpanQuery $little)
36
    {
37
        return $this->setParam('little', $little);
38
    }
39
40
    /**
41
     * @param AbstractSpanQuery $big
42
     *
43
     * @return $this
44
     */
45
    public function setBig(AbstractSpanQuery $big)
46
    {
47
        return $this->setParam('big', $big);
48
    }
49
}
50