Item   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
c 1
b 0
f 0
dl 0
loc 24
ccs 6
cts 6
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 3 1
A __construct() 0 4 1
1
<?php
2
3
4
namespace Hexogen\KDTree;
5
6
use Hexogen\KDTree\Interfaces\ItemInterface;
7
8
class Item extends Point implements ItemInterface
9
{
10
    private $id;
11
12
    /**
13
     * Item constructor.
14
     * @param int $id
15
     * @param array $dValues
16
     */
17 99
    public function __construct(int $id, array $dValues)
18
    {
19 99
        parent::__construct($dValues);
20 99
        $this->id = $id;
21 99
    }
22
23
    /**
24
     * get item id
25
     *
26
     * @api
27
     * @return int item id
28
     */
29 63
    public function getId() : int
30
    {
31 63
        return $this->id;
32
    }
33
}
34