OrganizationIndex   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 18
ccs 0
cts 9
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A createQuery() 0 11 1
1
<?php
2
3
/**
4
 * @copyright  Copyright (c) Flipbox Digital Limited
5
 * @license    https://flipboxfactory.com/software/organization/license
6
 * @link       https://www.flipboxfactory.com/software/organization/
7
 */
8
9
namespace flipbox\organizations\actions\organizations;
10
11
use flipbox\craft\ember\actions\elements\ElementIndex;
12
use flipbox\craft\ember\helpers\QueryHelper;
13
use flipbox\organizations\elements\Organization;
14
use flipbox\organizations\queries\OrganizationQuery;
15
use yii\db\QueryInterface;
16
17
/**
18
 * @author Flipbox Factory <[email protected]>
19
 * @since 1.0.0
20
 */
21
class OrganizationIndex extends ElementIndex
22
{
23
    /**
24
     * @inheritdoc
25
     * @return OrganizationQuery
26
     */
27
    public function createQuery(array $config = []): QueryInterface
28
    {
29
        $query = Organization::find();
30
31
        QueryHelper::configure(
32
            $query,
33
            $config
34
        );
35
36
        return $query;
37
    }
38
}
39