Item::getId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 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