Passed
Push — master ( cac36f...60f5bc )
by Anton
19:05 queued 11:33
created

Grid::init()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
nc 1
nop 0
dl 0
loc 9
c 1
b 0
f 0
cc 1
rs 10
1
<?php
2
3
/**
4
 * @copyright Bluz PHP Team
5
 * @link https://github.com/bluzphp/skeleton
6
 */
7
8
declare(strict_types=1);
9
10
namespace Application\Options;
11
12
use Bluz\Grid\Source\SelectSource;
0 ignored issues
show
Bug introduced by
The type Bluz\Grid\Source\SelectSource was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
13
14
/**
15
 * Grid based on SQL
16
 *
17
 * @package Application\Options
18
 */
19
class Grid extends \Bluz\Grid\Grid
0 ignored issues
show
Bug introduced by
The type Bluz\Grid\Grid was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
20
{
21
    /**
22
     * @var string
23
     */
24
    protected $uid = 'options';
25
26
    /**
27
     * {@inheritdoc}
28
     */
29
    public function init(): void
30
    {
31
        // Array
32
        $adapter = new SelectSource();
33
        $adapter->setSource(Table::select());
34
35
        $this->setAdapter($adapter);
36
        $this->setDefaultLimit(25);
37
        $this->setAllowOrders(['id', 'key', 'namespace', 'value', 'created', 'deleted']);
38
    }
39
}
40