Passed
Push — master ( 12ed59...661264 )
by Julien
05:22
created

ServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 3 1
1
<?php
2
/**
3
 * This file is part of the Zemit Framework.
4
 *
5
 * (c) Zemit Team <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE.txt
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Zemit\Provider\Environment;
12
13
use Phalcon\Di\DiInterface;
14
use Zemit\Provider\AbstractServiceProvider;
15
use Zemit\Utils\Env;
16
17
/**
18
 * Class ServiceProvider
19
 *
20
 * @author Julien Turbide <[email protected]>
21
 * @copyright Zemit Team <[email protected]>
22
 *
23
 * @since 1.0
24
 * @version 1.0
25
 *
26
 * @package Zemit\Provider\Environment
27
 */
28
class ServiceProvider extends AbstractServiceProvider
29
{
30
    /**
31
     * The Service name.
32
     * @var string
33
     */
34
    protected $serviceName = 'env';
35
    
36
    /**
37
     * {@inheritdoc}
38
     *
39
     * @return void
40
     */
41 7
    public function register(DiInterface $di): void
42
    {
43 7
        $di->setShared($this->getName(), Env::class);
44
    }
45
}
46