Passed
Push — master ( 5cce8c...cb0ced )
by Edward
04:53
created

Runtime   A

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