Runtime   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 13
c 1
b 0
f 0
dl 0
loc 41
ccs 14
cts 14
cp 1
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
A getEvaluator() 0 3 1
A getLiteralFactory() 0 3 1
A getValueListFetcher() 0 3 1
A getMatcherFactory() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Remorhaz\JSON\Path\Runtime;
6
7
final class Runtime implements RuntimeInterface
8
{
9
10
    private $valueListFetcher;
11
12
    private $evaluator;
13
14
    private $literalFactory;
15
16
    private $matcherFactory;
17
18 4
    public function __construct(
19
        ValueListFetcherInterface $valueListFetcher,
20
        EvaluatorInterface $evaluator,
21
        LiteralFactoryInterface $literalFactory,
22
        Matcher\MatcherFactoryInterface $matcherFactory
23
    ) {
24 4
        $this->valueListFetcher = $valueListFetcher;
25 4
        $this->evaluator = $evaluator;
26 4
        $this->literalFactory = $literalFactory;
27 4
        $this->matcherFactory = $matcherFactory;
28 4
    }
29
30 1
    public function getEvaluator(): EvaluatorInterface
31
    {
32 1
        return $this->evaluator;
33
    }
34
35 1
    public function getLiteralFactory(): LiteralFactoryInterface
36
    {
37 1
        return $this->literalFactory;
38
    }
39
40 1
    public function getMatcherFactory(): Matcher\MatcherFactoryInterface
41
    {
42 1
        return $this->matcherFactory;
43
    }
44
45 1
    public function getValueListFetcher(): ValueListFetcherInterface
46
    {
47 1
        return $this->valueListFetcher;
48
    }
49
}
50