App   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 9

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 9
dl 0
loc 39
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 20 1
A registerDebugProfiler() 0 15 1
1
<?php
2
3
namespace Eole\Sandstone\Tests\Integration\App;
4
5
use Silex\Provider;
6
use Eole\Sandstone\Push\Debug\PushServerProfilerServiceProvider;
7
use Eole\Sandstone\Application;
8
9
class App extends Application
10
{
11
    public function __construct(array $values = array())
12
    {
13
        parent::__construct($values);
14
15
        $this->register(new \Eole\Sandstone\Serializer\ServiceProvider());
16
17
        $this->register(new \Eole\Sandstone\Websocket\ServiceProvider(), [
18
            'sandstone.websocket.server' => [
19
                'bind' => '0.0.0.0',
20
                'port' => '8080',
21
            ],
22
        ]);
23
24
        $this['serializer.builder']->addMetadataDir(
25
            __DIR__,
26
            'Eole\\Sandstone\\Tests\\App'
27
        );
28
29
        $this->registerDebugProfiler();
30
    }
31
32
    private function registerDebugProfiler()
33
    {
34
        $this->register(new \Eole\Sandstone\Push\ServiceProvider());
35
36
        $this->register(new Provider\HttpFragmentServiceProvider());
37
        $this->register(new Provider\ServiceControllerServiceProvider());
38
        $this->register(new Provider\TwigServiceProvider());
39
40
        $this->register(new Provider\WebProfilerServiceProvider(), array(
41
            'profiler.cache_dir' => __DIR__.'/profiler',
42
            'profiler.mount_prefix' => '/_profiler',
43
        ));
44
45
        $this->register(new PushServerProfilerServiceProvider());
46
    }
47
}
48