NonExistentValue   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 37
ccs 8
cts 8
cp 1
rs 10
wmc 3
lcom 0
cbo 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getValue() 0 4 1
A getPointer() 0 4 1
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 6
    public function getPointer()
41
    {
42 6
        return $this->pointer;
43
    }
44
}
45