Conditions | 4 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
4 | public function renderElements() |
||
5 | { |
||
6 | $elements = $this->getElements(); |
||
7 | if ($elements) { |
||
8 | foreach ($elements as $element) { |
||
9 | if (!$element->isRendered()) { |
||
10 | $idRow = $element->getUniqueId(); |
||
11 | $this->setRowAttrib($idRow, 'class', "row " . $idRow); |
||
12 | $this->addCell($idRow, 1, $element, 'label'); |
||
13 | $this->addCell($idRow, 2, $element, 'value'); |
||
14 | } |
||
15 | } |
||
16 | } |
||
17 | return parent::renderElements(); |
||
18 | } |
||
20 |
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.