Completed
Pull Request — master (#26)
by
unknown
01:44
created

NonExistentValue::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 2
dl 0
loc 5
ccs 4
cts 4
cp 1
crap 1
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace League\JsonReference\Pointer;
4
5
/**
6
 * Represents a value referenced by a pointer that does not exist in the JSON data.
7
 */
8
final class NonExistentValue
9
{
10
    /**
11
     * @var string
12
     */
13
    private $value;
14
    /**
15
     * @var string
16
     */
17
    private $pointer;
18
19
    /**
20
     * @param string $value The referenced value.
21
     * @param string $pointer The full pointer which contains the invalid value.
22
     */
23 10
    public function __construct($value, $pointer)
24
    {
25 10
        $this->value = $value;
26 10
        $this->pointer = $pointer;
27 10
    }
28
29
    /**
30
     * @return string
31
     */
32 6
    public function getValue()
33
    {
34 6
        return $this->value;
35
    }
36
37
    /**
38
     * @return string
39
     */
40
    public function getPointer()
41
    {
42
        return $this->pointer;
43
    }
44
}
45