Test Failed
Pull Request — master (#70)
by Rafael
04:52
created

library/Providers/EventManagerProvider.php (1 issue)

1
<?php
2
3
namespace Gewaer\Providers;
4
5
use Phalcon\Di\ServiceProviderInterface;
6
use Phalcon\DiInterface;
7
use Namshi\Notificator\Manager;
8
use function Gewaer\Core\appPath;
9
10
class EventManagerProvider implements ServiceProviderInterface
11
{
12
    /**
13
     * @param DiInterface $container
14
     */
15 71
    public function register(DiInterface $container)
16
    {
17 71
        $config = $container->getShared('config');
18
19 71
        $container->setShared(
20 71
            'manager',
21
            function () use ($config) {
22
                $manager = new Manager();
23
24
                $handlers =  $this->providers = require appPath('api/config/handlers.php');
1 ignored issue
show
Bug Best Practice introduced by
The property providers does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
25
26
                //Pass Handlers as array
27
                $manager->setHandlers($handlers);
28
29
                return $manager;
30 71
            }
31
        );
32 71
    }
33
}
34