Passed
Pull Request — main (#3378)
by Mario
50:21 queued 18:39
created

NumericRangeCount::getDocumentCount()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
/*
4
 * This file is part of the TYPO3 CMS project.
5
 *
6
 * It is free software; you can redistribute it and/or modify it under
7
 * the terms of the GNU General Public License, either version 2
8
 * of the License, or any later version.
9
 *
10
 * For the full copyright and license information, please read the
11
 * LICENSE.txt file that was distributed with this source code.
12
 *
13
 * The TYPO3 project - inspiring people to share!
14
*/
15
16
/**
17
 * Value object that represent an date range count. The count has a date and the count of documents
18
 *
19
 * @author Frans Saris <[email protected]>
20
 * @author Timo Hund <[email protected]>
21
 */
22
23
namespace ApacheSolrForTypo3\Solr\Domain\Search\ResultSet\Facets\RangeBased\NumericRange;
24
25
class NumericRangeCount
26
{
27
    /**
28
     * @var float
29
     */
30
    protected $rangeItem;
31
32
    /**
33
     * @var int
34
     */
35
    protected $documentCount = 0;
36
37
    /**
38
     * @param float $rangeItem
39
     * @param int $documentCount
40
     */
41 4
    public function __construct($rangeItem, $documentCount)
42
    {
43 4
        $this->rangeItem = $rangeItem;
44 4
        $this->documentCount = $documentCount;
45
    }
46
47
    /**
48
     * @return float
49
     */
50
    public function getRangeItem()
51
    {
52
        return $this->rangeItem;
53
    }
54
55
    /**
56
     * @return int
57
     */
58
    public function getDocumentCount()
59
    {
60
        return $this->documentCount;
61
    }
62
}
63