Passed
Push — master ( 5a6aec...5e9b73 )
by Gordon
05:22 queued 02:54
created

FacetCount   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 7
c 1
b 0
f 0
dl 0
loc 31
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getCount() 0 3 1
A __construct() 0 4 1
A getKey() 0 3 1
1
<?php declare(strict_types = 1);
2
3
namespace Suilven\FreeTextSearch\Container;
4
5
/**
6
 * Class Facet
7
 *
8
 * @package Suilven\FreeTextSearch\Container
9
 */
10
class FacetCount
11
{
12
    /** @var string|float|int|bool */
13
    private $key;
14
15
    /** @var int */
16
    private $count;
17
18
19
    /**
20
     * FacetCount constructor.
21
     *
22
     * @param string|float|int|bool $key
23
     */
24
    public function __construct($key, int $count)
25
    {
26
        $this->key = $key;
27
        $this->count = $count;
28
    }
29
30
31
    /** @return string|float|int|bool */
32
    public function getKey()
33
    {
34
        return $this->key;
35
    }
36
37
38
    public function getCount(): int
39
    {
40
        return $this->count;
41
    }
42
}
43