SettingsValue::byImportFileId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 2
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 * User: execut
4
 * Date: 29.07.16
5
 * Time: 17:06
6
 */
7
8
namespace execut\import\models\queries;
9
10
use execut\import\models;
11
use yii\db\ActiveQuery;
12
13
class SettingsValue extends ActiveQuery
14
{
15
    public function byImportFileId($id) {
16
        return $this->byImportSettingsSetId(models\SettingsSet::find()->byImportFileId($id)->select('id'));
17
    }
18
19
    public function byImportSettingsSetId($id) {
20
        return $this->andWhere([
21
            'import_settings_set_id' => $id,
22
        ]);
23
    }
24
25
    public function byType($value) {
26
        return $this->andWhere([
27
            'type' => $value,
28
        ]);
29
    }
30
}