Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
22 | 12 | public static function create($attribute, $value) |
|
23 | { |
||
24 | 12 | $attributesType = self::getAllAttributeType(); |
|
25 | 12 | foreach ($attributesType as $attributeType) { |
|
26 | 12 | if ($attributeType->isMember($attribute)) { |
|
27 | 12 | return $attributeType->create($value); |
|
28 | } |
||
29 | } |
||
30 | |||
31 | 3 | return $value; |
|
32 | } |
||
33 | |||
50 |