Passed
Push — task/2976_TYPO3.11_compatibili... ( 803400...b598e4 )
by Rafael
33:58 queued 15:41
created

NumericRangeCount::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

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