Conditions | 7 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 7 |
Changes | 0 |
1 | <?php |
||
38 | 3 | private function isConstraintsPropertyValid($constraints) |
|
39 | { |
||
40 | 3 | if (!is_array($constraints) && !is_null($constraints)) { |
|
41 | 2 | return false; |
|
42 | } |
||
43 | |||
44 | 3 | if (!empty($constraints)) { |
|
45 | 2 | foreach ($constraints as $constraint) { |
|
46 | 2 | if (!is_array($constraint) || count($constraint) != 3) { |
|
47 | 2 | return false; |
|
48 | } |
||
49 | } |
||
50 | } |
||
51 | |||
52 | 2 | return true; |
|
53 | } |
||
54 | } |
||
55 |