Test Failed
Push — master ( f82b48...e7e248 )
by Maximo
03:08
created

ConfigProvider::register()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 1
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
0 ignored issues
show
Coding Style introduced by
End of line character is invalid; expected "\n" but found "\r\n"
Loading history...
2
3
declare(strict_types=1);
4
5
namespace Gewaer\Providers;
6
7
use function Gewaer\Core\appPath;
8
use Phalcon\DiInterface;
9
use Phalcon\Di\ServiceProviderInterface;
10
use Phalcon\Config;
11
12
class ConfigProvider implements ServiceProviderInterface
13
{
14
    /**
15
     * @param DiInterface $container
16
     */
17
    public function register(DiInterface $container)
18
    {
19
        $container->setShared(
20
            'config',
21
            function () {
22
                $data = require appPath('library/Core/config.php');
23
24
                return new Config($data);
25
            }
26
        );
27
    }
28
}
29