Completed
Push — master ( 39c1d7...699dc6 )
by Changwan
06:44
created

ValidatorServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 1
b 0
f 1
1
<?php
2
namespace Wandu\Validator;
3
4
use Wandu\DI\ContainerInterface;
5
use Wandu\DI\ServiceProviderInterface;
6
7
class ValidatorServiceProvider implements ServiceProviderInterface
8
{
9
    /**
10
     * {@inheritdoc}
11
     */
12
    public function register(ContainerInterface $app)
13
    {
14 2
        $app->closure(ValidatorFactory::class, function () {
15 1
            return validator();
16 2
        });
17 2
        $app->alias('validator', ValidatorFactory::class);
18 2
    }
19
20
    /**
21
     * {@inheritdoc}
22
     */
23 2
    public function boot(ContainerInterface $app)
24
    {
25 2
    }
26
}
27