Passed
Push — master ( eda60d...02421d )
by Pol
01:42
created

Extension   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 16
c 1
b 0
f 0
dl 0
loc 29
ccs 16
cts 16
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A load() 0 24 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace loophp\phpspectime;
6
7
use loophp\phpspectime\Matcher\TakeInBetweenMatcher;
8
use loophp\phpspectime\Matcher\TakeLessThanMatcher;
9
use loophp\phpspectime\Matcher\TakeMoreThanMatcher;
10
use PhpSpec\Extension as ExtensionInterface;
11
use PhpSpec\ServiceContainer;
12
use PhpSpec\ServiceContainer\IndexedServiceContainer;
13
use Ubench;
14
15
final class Extension implements ExtensionInterface
16
{
17
    /**
18
     * @return void
19
     */
20 1
    public function load(ServiceContainer $container, array $params)
21
    {
22 1
        $container->define(
23 1
            'matchers.takeMoreThan',
24
            static function (IndexedServiceContainer $c) {
25 1
                return new TakeMoreThanMatcher($c->get('unwrapper'), $c->get('formatter.presenter'), new Ubench());
26 1
            },
27 1
            ['matchers']
28
        );
29
30 1
        $container->define(
31 1
            'matchers.takeLessThan',
32
            static function (IndexedServiceContainer $c) {
33 1
                return new TakeLessThanMatcher($c->get('unwrapper'), $c->get('formatter.presenter'), new Ubench());
34 1
            },
35 1
            ['matchers']
36
        );
37
38 1
        $container->define(
39 1
            'matchers.takeInBetween',
40
            static function (IndexedServiceContainer $c) {
41 1
                return new TakeInBetweenMatcher($c->get('unwrapper'), $c->get('formatter.presenter'), new Ubench());
42 1
            },
43 1
            ['matchers']
44
        );
45 1
    }
46
}
47