Histogram::setBucketSize()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 5
ccs 0
cts 3
cp 0
crap 2
rs 10
1
<?php
2
3
namespace CMEN\GoogleChartsBundle\GoogleCharts\Options\Histogram;
4
5
/**
6
 * @author Christophe Meneses
7
 */
8
class Histogram
9
{
10
    /**
11
     * Hardcode the size of each histogram bar, rather than letting it be determined algorithmically.
12
     *
13
     * @var int
14
     */
15
    protected $bucketSize;
16
17
    /**
18
     * Omit the thin divisions between the blocks of the histogram, making it into a series of solid bars.
19
     *
20
     * @var bool
21
     */
22
    protected $hideBucketItems;
23
24
    /**
25
     * When calculating the histogram's bucket size, ignore the top and bottom lastBucketPercentile percent.
26
     *
27
     * @var int
28
     */
29
    protected $lastBucketPercentile;
30
31
    /**
32
     * @return $this
33
     */
34
    public function setBucketSize(int $bucketSize)
35
    {
36
        $this->bucketSize = $bucketSize;
37
38
        return $this;
39
    }
40
41
    /**
42
     * @return $this
43
     */
44
    public function setHideBucketItems(bool $hideBucketItems)
45
    {
46
        $this->hideBucketItems = $hideBucketItems;
47
48
        return $this;
49
    }
50
51
    /**
52
     * @return $this
53
     */
54
    public function setLastBucketPercentile(int $lastBucketPercentile)
55
    {
56
        $this->lastBucketPercentile = $lastBucketPercentile;
57
58
        return $this;
59
    }
60
}
61