Completed
Push — master ( fa9a11...9c37c7 )
by Jens
13:15
created

FacetResultCollection::getByName()   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
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
/**
3
 * @author @jayS-de <[email protected]>
4
 */
5
6
namespace Commercetools\Core\Model\Product;
7
8
use Commercetools\Core\Model\Common\Collection;
9
10
/**
11
 * @package Commercetools\Core\Model\Product
12
 * @method FacetResult current()
13
 * @method FacetResultCollection add(FacetResult $element)
14
 * @method FacetResult getAt($offset)
15
 */
16
class FacetResultCollection extends Collection
17
{
18
    const OFFSET = 'offset';
19
20
    protected $type = '\Commercetools\Core\Model\Product\FacetResult';
21
22
    /**
23
     * @param $name
24
     * @return FacetResult
25
     */
26 9
    public function getByName($name)
27
    {
28 9
        return $this->getAt($name);
29
    }
30
}
31