Completed
Push — master ( 5e7707...6e3d76 )
by Igor
03:56
created

UserProviderQuery::provider()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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