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

EngineFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A createEngine() 0 11 1
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