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

NodeCollection   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 3
dl 0
loc 19
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A add() 0 3 1
A getByPosition() 0 3 1
1
<?php
2
namespace ApacheSolrForTypo3\Solr\Domain\Search\ResultSet\Facets\OptionBased\Hierarchy;
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
use ApacheSolrForTypo3\Solr\Domain\Search\ResultSet\Facets\AbstractFacetItemCollection;
17
18
/**
19
 * Collection for facet options.
20
 *
21
 * @author Frans Saris <[email protected]>
22
 * @author Timo Hund <[email protected]>
23
 */
24
class NodeCollection extends AbstractFacetItemCollection
25
{
26
27
    /**
28
     * @param Node $node
29
     * @return NodeCollection
30
     */
31 8
    public function add($node)
32
    {
33 8
        return parent::add($node);
34
    }
35
36
    /**
37
     * @param int $position
38
     * @return Node
39
     */
40 5
    public function getByPosition($position)
41
    {
42 5
        return parent::getByPosition($position);
43
    }
44
}
45