Completed
Pull Request — master (#2)
by Mathieu
05:06 queued 01:16
created

CategoriesList   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

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

1 Method

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