Test Failed
Push — master ( 201804...292840 )
by Julien
05:05
created

ServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 4 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\LoremIpsum;
12
13
use Zemit\Provider\AbstractServiceProvider;
14
use Phalcon\Di\DiInterface;
15
use joshtronic\LoremIpsum;
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\Mailer
27
 */
28
class ServiceProvider extends AbstractServiceProvider
29
{
30
    /**
31
     * The Service name.
32
     * @var string
33
     */
34
    protected $serviceName = 'loremIpsum';
35
    
36
    /**
37
     * {@inheritdoc}
38
     *
39
     * @return void
40
     */
41
    public function register(DiInterface $di): void
42
    {
43
        $di->setShared($this->getName(), function() {
0 ignored issues
show
Coding Style introduced by
Expected 1 space after FUNCTION keyword; 0 found
Loading history...
44
            return new LoremIpsum();
45
        });
46
    }
47
}
48