| Conditions | 4 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 41 | public function renderAttributes($overrides = array()) |
||
| 42 | { |
||
| 43 | $attribs = $this->getGroup()->getAttribs(); |
||
| 44 | $elementAttribs = $this->getElementAttribs(); |
||
| 45 | $return = ''; |
||
| 46 | foreach ($attribs as $name => $value) { |
||
| 47 | if (in_array($name, $elementAttribs)) { |
||
| 48 | if (in_array($name, array_keys($overrides))) { |
||
| 49 | $value = $overrides[$name]; |
||
| 50 | } |
||
| 51 | $return .= ' ' . $name . '="' . $value . '"'; |
||
| 52 | } |
||
| 53 | } |
||
| 54 | return $return; |
||
| 55 | } |
||
| 62 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.