Test Failed
Push — master ( 614ce5...540a9b )
by Hannes
02:11
created

EngineFactory::createEngine()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 8
nc 1
nop 1
dl 0
loc 11
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace hanneskod\readmetester;
6
7
use hanneskod\readmetester\Example\ExampleFactory;
8
use hanneskod\readmetester\Example\FilterInterface;
9
use hanneskod\readmetester\Parser\Parser;
10
use hanneskod\readmetester\Expectation\ExpectationEvaluator;
11
use hanneskod\readmetester\Expectation\ExpectationFactory;
12
use hanneskod\readmetester\Runner\EvalRunner;
13
14
class EngineFactory
15
{
16
    public function createEngine(FilterInterface $filter = null): Engine
17
    {
18
        return new Engine(
19
            new Parser,
20
            new ExampleFactory(
21
                new ExpectationFactory,
22
                $filter
23
            ),
24
            new ExampleTester(
25
                new EvalRunner,
26
                new ExpectationEvaluator
27
            )
28
        );
29
    }
30
}
31