Completed
Push — master ( 6d2df6...196bfd )
by Tõnis
02:08
created

Condition::getIsMet()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
namespace dameter\abstracts\models;
4
5
use dameter\abstracts\validators\VariableNameValidator;
6
use dameter\abstracts\WithSurveyModel;
7
8
/**
9
 * Class Condition
10
 * @package dameter\abstracts\models
11
 * @author Tõnis Ormisson <[email protected]>
12
 *
13
 * @property integer $condition_id
14
 * @property string $name
15
 * @property string $rules
16
 * @property boolean $isMet whether the condition rules result in true
17
 */
18
class Condition extends WithSurveyModel
19
{
20
    /**
21
     * {@inheritdoc}
22
     */
23
    public function rules()
24
    {
25
        return array_merge(parent::rules(), [
26
            [['name', 'rules'], 'required'],
27
            [['name'], VariableNameValidator::class],
28
            [['rules'], 'string'],
29
        ]);
30
    }
31
32
    /**
33
     * @return bool
34
     */
35
    public function getIsMet()
36
    {
37
        // TODO
38
        return true;
39
    }
40
41
42
}