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

UserProviderQuery   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 15
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A provider() 0 5 1
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