MoltenServiceProvider::register()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 2.2559

Importance

Changes 0
Metric Value
cc 2
eloc 3
nc 2
nop 1
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
ccs 3
cts 5
cp 0.6
crap 2.2559
1
<?php
2
/**
3
 * @author    jan huang <[email protected]>
4
 * @copyright 2017
5
 *
6
 * @see      https://www.github.com/janhuang
7
 * @see      https://fastdlabs.com
8
 */
9
10
namespace FastD\ServiceProvider;
11
12
use FastD\Container\Container;
13
use FastD\Container\ServiceProviderInterface;
14
15
class MoltenServiceProvider implements ServiceProviderInterface
16
{
17
    /**
18
     * @param Container $container
19
     *
20
     * @return mixed
21
     */
22 32
    public function register(Container $container)
23
    {
24 32
        if (function_exists('molten_set_service_name')) {
25
            molten_set_service_name(app()->getName());
26
        }
27 32
    }
28
}
29