Passed
Push — master ( 6a1d3b...e8f7f2 )
by Sidney
02:42
created

FakeModel::resetData()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
c 0
b 0
f 0
rs 9.4285
cc 2
eloc 3
nc 2
nop 0
1
<?php
2
/**
3
 * @author: Sidney Lins - [email protected]
4
 * Please, check the LICENSE information.
5
 */
6
7
namespace codeonyii\yii2validators\tests;
8
9
10
use yii\base\Model;
11
12
class FakeModel extends Model
13
{
14
    public $attr1;
15
    public $attr2;
16
    public $attr3;
17
    public $attr4;
18
    public $attr5;
19
20
    public function resetData()
21
    {
22
        for ($i = 1; $i <= 5; $i++) {
23
            $attr = 'attr' . $i;
24
            $this->$attr = null;
25
        }
26
    }
27
}