Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
38 | protected function initializeAttribute(array $attr) |
||
39 | { |
||
40 | |||
41 | // try to load the attribute with the passed attribute ID and merge it with the attributes |
||
42 | if (isset($this->attributes[$attributeId = (integer) $attr[MemberNames::ATTRIBUTE_ID]])) { |
||
43 | return $this->mergeEntity($this->attributes[$attributeId], $attr); |
||
44 | } |
||
45 | |||
46 | // otherwise simply return the attributes |
||
47 | return $attr; |
||
48 | } |
||
50 |