UserProviderQuery::provider()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
ccs 0
cts 2
cp 0
cc 1
nc 1
nop 2
crap 2
1
<?php
2
3
namespace app\models\query;
4
5
use yii\db\ActiveQuery;
6
7
/**
8
 * This is the ActiveQuery class for [[\entity\UserProvider]]
9
 *
10
 * @see \entity\UserProvider
11
 */
12
class UserProviderQuery extends ActiveQuery
13
{
14
    /**
15
     * Select by type of provider
16
     *
17
     * @param int $type
18
     * @param string $profileId
19
     * @return yii\db\ActiveQuery
20
     */
21
    public function provider(int $type, string $profileId): ActiveQuery
22
    {
23
        $this->andWhere(['type' => $type, 'profile_id' => $profileId]);
24
        return $this;
25
    }
26
}
27