Test Failed
Push — master ( 6507f4...b0fb34 )
by Maximo
02:09
created

PusherProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 8 1
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
namespace Gewaer\Providers;
4
5
use Phalcon\Di\ServiceProviderInterface;
6
use Phalcon\DiInterface;
7
use Pusher\Pusher;
0 ignored issues
show
Bug introduced by
The type Pusher\Pusher was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
9
class PusherProvider implements ServiceProviderInterface
10
{
11
    /**
12
     * @param DiInterface $container
13
     */
14
    public function register(DiInterface $container)
15
    {
16
        $config = $container->getShared('config');
17
18
        $container->setShared(
19
            'pusher',
20
            function () use ($config) {
21
                return new Pusher($config->pusher->key, $config->pusher->secret, $config->pusher->id, ['cluster' => $config->pusher->cluster, 'useTLS' => true]);
22
            }
23
        );
24
    }
25
}
26