IntegerIndex::getValue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: christian
5
 * Date: 1/4/17
6
 * Time: 4:14 AM
7
 */
8
9
namespace Veloci\Core\Model;
10
11
12
use Veloci\Core\EntityIndex;
13
14
/**
15
 * Class IntegerIndex
16
 *
17
 * @package Veloci\Core\Model
18
 */
19
class IntegerIndex implements EntityIndex
20
{
21
    /**
22
     * @var int
23
     */
24
    private $value;
25
26
    /**
27
     * IntegerIndex constructor.
28
     *
29
     * @param int $value
30
     */
31 10
    public function __construct(int $value) {
32
33 10
        $this->value = $value;
34 10
    }
35
36
    /**
37
     * @return mixed
0 ignored issues
show
Documentation introduced by
Consider making the return type a bit more specific; maybe use integer.

This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.

Loading history...
38
     */
39 1
    public function getValue()
40
    {
41 1
        return $this->value;
42
    }
43
44
    /**
45
     * @return string
46
     */
47 7
    public function __toString():string
48
    {
49 7
        return (string)$this->value;
50
    }
51
}