Passed
Push — master ( 3a32e2...77143f )
by Edward
04:21
created

NonExistingResult::__construct()   A

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
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
declare(strict_types=1);
3
4
namespace Remorhaz\JSON\Pointer\Processor\Result;
5
6
final class NonExistingResult implements ResultInterface
7
{
8
9
    private $source;
10
11 3
    public function __construct(string $source)
12
    {
13 3
        $this->source = $source;
14 3
    }
15
16 1
    public function exists(): bool
17
    {
18 1
        return false;
19
    }
20
21 1
    public function encode(): string
22
    {
23 1
        throw new Exception\ResultNotFoundException($this->source);
24
    }
25
26 1
    public function decode()
27
    {
28 1
        throw new Exception\ResultNotFoundException($this->source);
29
    }
30
}
31