Conditions | 1 |
Paths | 1 |
Total Lines | 43 |
Code Lines | 29 |
Lines | 0 |
Ratio | 0 % |
Tests | 26 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | 1 | public function load(ServiceContainer $container, array $params) |
|
22 | { |
||
23 | $params += [ |
||
24 | 1 | 'timeunit' => TimeUnit::SECOND, |
|
25 | ]; |
||
26 | |||
27 | 1 | $container->define( |
|
28 | 1 | 'matchers.takeMoreThan', |
|
29 | static function (IndexedServiceContainer $c) use ($params) { |
||
30 | 1 | return new TakeMoreThanMatcher( |
|
31 | 1 | $c->get('unwrapper'), |
|
32 | 1 | $c->get('formatter.presenter'), |
|
33 | 1 | new BenchmarkFactory(), |
|
34 | $params |
||
35 | ); |
||
36 | 1 | }, |
|
37 | 1 | ['matchers'] |
|
38 | ); |
||
39 | |||
40 | 1 | $container->define( |
|
41 | 1 | 'matchers.takeLessThan', |
|
42 | static function (IndexedServiceContainer $c) use ($params) { |
||
43 | 1 | return new TakeLessThanMatcher( |
|
44 | 1 | $c->get('unwrapper'), |
|
45 | 1 | $c->get('formatter.presenter'), |
|
46 | 1 | new BenchmarkFactory(), |
|
47 | $params |
||
48 | ); |
||
49 | 1 | }, |
|
50 | 1 | ['matchers'] |
|
51 | ); |
||
52 | |||
53 | 1 | $container->define( |
|
54 | 1 | 'matchers.takeInBetween', |
|
55 | static function (IndexedServiceContainer $c) use ($params) { |
||
56 | 1 | return new TakeInBetweenMatcher( |
|
57 | 1 | $c->get('unwrapper'), |
|
58 | 1 | $c->get('formatter.presenter'), |
|
59 | 1 | new BenchmarkFactory(), |
|
60 | $params |
||
61 | ); |
||
62 | 1 | }, |
|
63 | 1 | ['matchers'] |
|
64 | ); |
||
67 |