Passed
Pull Request — release-11.2.x (#3154)
by Markus
16:09
created

AbstractRangeFacetItem::getUriValue()   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
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
crap 2
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
 */
25
abstract class AbstractRangeFacetItem extends AbstractFacetItem
26
{
27
28
    /**
29
     * @var array
30
     */
31
    protected $rangeCounts;
32
33
    /**
34
     * @var string
35
     */
36
    protected $gap;
37
38
    /**
39
     * @return string
40
     */
41
    public function getUriValue()
42
    {
43
        return $this->getRangeString();
44
    }
45
46
    /**
47
     * @return string
48
     */
49 1
    public function getCollectionKey()
50
    {
51 1
        return $this->getRangeString();
52
    }
53
54
    /**
55
     * @return array
56
     */
57 2
    public function getRangeCounts()
58
    {
59 2
        return $this->rangeCounts;
60
    }
61
62
    /**
63
     * @return string
64
     */
65 1
    public function getGap()
66
    {
67 1
        return $this->gap;
68
    }
69
70
    /**
71
     * @return string
72
     */
73
    abstract protected function getRangeString();
74
}
75