Passed
Push — develop ( 77747e...4f7d52 )
by Mathieu
01:41
created

Category::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 9
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 13
rs 9.9666
1
<?php
2
3
class Category extends \Suricate\DBObject
4
{
5
    protected $tableName = 'categories';
6
    protected $tableIndex = 'id';
7
8
    public function __construct()
9
    {
10
        parent::__construct();
11
        $database = new \Suricate\Database();
12
        $database->configure([
13
            'type' => 'sqlite',
14
            'file' => '/tmp/test.db',
15
        ]);
16
        $this->dbLink = $database;
17
18
        $this->dbVariables = [
19
            'id',
20
            'name'
21
        ];
22
    }
23
}
24