Failed Conditions
Pull Request — master (#10)
by Maximo
03:08
created

library/Providers/ConfigProvider.php (1 issue)

1
<?php
0 ignored issues
show
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 22
    public function register(DiInterface $container)
18
    {
19 22
        $container->setShared(
20 22
            'config',
21
            function () {
22 21
                $data = require appPath('library/Core/config.php');
23
24 21
                return new Config($data);
25 22
            }
26
        );
27 22
    }
28
}
29