Application::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 8
nc 1
nop 1
1
<?php
2
3
namespace MS\Sentry\Monitor;
4
5
use MS\Sentry\Monitor\Migration\EventTable;
6
use Silex\Application as BaseApplication;
7
use Silex\Provider\DoctrineServiceProvider;
8
9
class Application extends BaseApplication
10
{
11
    /**
12
     * @param array $values
13
     */
14
    public function __construct(array $values = [])
15
    {
16
        parent::__construct($values);
17
18
        $this->register(new DoctrineServiceProvider, ['db.options' => [
19
            'dbname' => 'events',
20
            'driver' => 'pdo_sqlite',
21
            'path' => getenv('HOME') . '/.events.db',
22
        ]]);
23
24
        $eventTable = new EventTable($this['db']);
25
        $eventTable->create();
26
    }
27
}
28