Passed
Push — master ( a95893...a4d2df )
by Timo
57s
created

AbstractRangeFacetItem::getGap()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
namespace ApacheSolrForTypo3\Solr\Domain\Search\ResultSet\Facets\RangeBased;
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
use ApacheSolrForTypo3\Solr\Domain\Search\ResultSet\Facets\AbstractFacetItem;
18
19
/**
20
 * Abstract class that is used as base class for range facet items
21
 *
22
 * @author Frans Saris <[email protected]>
23
 * @author Timo Hund <[email protected]>
24
 * @package ApacheSolrForTypo3\Solr\Domain\Search\ResultSet\Facets\OptionsFacet
25
 */
26
abstract class AbstractRangeFacetItem extends AbstractFacetItem
27
{
28
29
    /**
30
     * @var array
31
     */
32
    protected $rangeCounts;
33
34
35
    /**
36
     * @var string
37
     */
38
    protected $gap;
39
40
    /**
41
     * @return string
42
     */
43
    public function getUriValue()
44
    {
45
        return $this->getRangeString();
46
    }
47
48
    /**
49
     * @return string
50
     */
51
    public function getCollectionKey()
52
    {
53
        return $this->getRangeString();
54
    }
55
56
    /**
57
     * @return array
58
     */
59 2
    public function getRangeCounts()
60
    {
61 2
        return $this->rangeCounts;
62
    }
63
64
    /**
65
     * @return string
66
     */
67 2
    public function getGap()
68
    {
69 2
        return $this->gap;
70
    }
71
72
    /**
73
     * @return string
74
     */
75
    abstract protected function getRangeString();
76
}
77