FakeModel   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 9
dl 0
loc 13
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A resetData() 0 5 2
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
}