Completed
Push — master ( 7c4612...0fe38b )
by Nicolas
01:47
created

Sampler   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A setShardSize() 0 4 1
1
<?php
2
3
namespace Elastica\Aggregation;
4
5
/**
6
 * Class Sampler.
7
 *
8
 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-sampler-aggregation.html
9
 */
10
class Sampler extends AbstractAggregation
11
{
12
    /**
13
     * Set the number of top-scoring documents to be returned from each shard.
14
     *
15
     * @param int $shardSize
16
     *
17
     * @return $this
18
     */
19
    public function setShardSize(int $shardSize): self
20
    {
21
        return $this->setParam('shard_size', $shardSize);
22
    }
23
}
24