PimpleServiceProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 15
ccs 4
cts 4
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 7 1
1
<?php
2
3
namespace SocketCluster\Providers;
4
5
use Pimple\Container;
6
use Pimple\ServiceProviderInterface;
7
use SocketCluster\WebSocket;
8
use SocketCluster\SocketCluster;
9
10
class PimpleServiceProvider implements ServiceProviderInterface
11
{
12
    /**
13
     * Register bindings in the container.
14
     *
15
     * @return void
16
     */
17
    public function register(Container $app)
18
    {
19 1
        $app['socketcluster'] = function ($app) {
20 1
            $websocket = WebSocket::factory($app['socketcluster.options']);
21 1
            return new SocketCluster($websocket);
22
        };
23 1
    }
24
}
25