Completed
Push — develop ( b2e8eb...684153 )
by Mathieu
01:39
created

CategoriesList   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
dl 0
loc 16
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
1
<?php
2
3
class CategoriesList extends \Suricate\DBCollection
4
{
5
    protected $tableName = 'categories';
6
    protected $itemsType = Category::class;
7
    protected $parentIdField = 'parent_id';
8
    protected $parentType = Category::class;
9
10
    public function __construct()
11
    {
12
        parent::__construct();
13
        $database = new \Suricate\Database();
14
        $database->configure([
15
            'type' => 'sqlite',
16
            'file' => '/tmp/test.db',
17
        ]);
18
        $this->dbLink = $database;
19
    }
20
}
21