Test Failed
Push — master ( a29797...6ce97f )
by huang
06:37
created

ProcessorServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 17
rs 10
c 0
b 0
f 0
ccs 6
cts 6
cp 1
wmc 2
lcom 0
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 9 2
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
/**
16
 * Class ProcessorServiceProvider.
17
 */
18
class ProcessorServiceProvider implements ServiceProviderInterface
19
{
20
    /**
21
     * @param Container $container
22
     *
23
     * @return mixed
24
     */
25 37
    public function register(Container $container)
26
    {
27 37
        $path = app()->getPath().'/config/process.php';
28 37
        if (file_exists($path)) {
29 37
            config()->set('processes', include $path);
30 37
        }
31
32 37
        return 0;
33
    }
34
}
35