Completed
Push — master ( 19b2ae...0e0de4 )
by Nate
04:43
created

ProviderIndex::createQuery()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 11
ccs 0
cts 9
cp 0
rs 9.9
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
/**
4
 * @copyright  Copyright (c) Flipbox Digital Limited
5
 * @license    https://flipboxfactory.com/software/patron/license
6
 * @link       https://www.flipboxfactory.com/software/patron/
7
 */
8
9
namespace flipbox\patron\actions\provider;
10
11
use flipbox\craft\ember\actions\records\RecordIndex;
12
use flipbox\craft\ember\helpers\QueryHelper;
13
use flipbox\patron\records\Provider;
14
use yii\db\QueryInterface;
15
16
/**
17
 * @author Flipbox Factory <[email protected]>
18
 * @since 1.0.0
19
 */
20
class ProviderIndex extends RecordIndex
21
{
22
    /**
23
     * @inheritdoc
24
     * @throws \yii\base\InvalidConfigException
25
     */
26
    protected function createQuery(array $config = []): QueryInterface
27
    {
28
        $query = Provider::find();
29
30
        QueryHelper::configure(
31
            $query,
32
            $config
33
        );
34
35
        return $query;
36
    }
37
}
38