Test Failed
Push — master ( 070dc1...95bb55 )
by Julien
03:33
created

ServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 5
c 1
b 0
f 0
dl 0
loc 15
ccs 2
cts 4
cp 0.5
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 6 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\Crypt;
12
13
use Phalcon\Di\DiInterface;
14
use Zemit\Crypt;
15
use Zemit\Provider\AbstractServiceProvider;
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\Crypt
27
 */
28
class ServiceProvider extends AbstractServiceProvider
29
{
30
    protected $serviceName = 'crypt';
31
    
32
    /**
33
     * {@inheritdoc}
34
     *
35
     * @param DiInterface $di
36
     */
37 4
    public function register(\Phalcon\Di\DiInterface $di): void
38
    {
39 4
        $di->setShared($this->getName(), function() use ($di) {
0 ignored issues
show
Unused Code introduced by
The import $di is not used and could be removed.

This check looks for imports that have been defined, but are not used in the scope.

Loading history...
Coding Style introduced by
Expected 1 space after FUNCTION keyword; 0 found
Loading history...
40
            $crypt = new Crypt();
41
            
42
            return $crypt;
43 4
        });
44 4
    }
45
}
46