for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Nip\Form\Renderer\AbstractRenderer;
class Nip_Form_Renderer_List extends AbstractRenderer
{
protected $_list = [];
public function setListAttrib($type, $value)
$this->_list[$type] = $value;
return $this;
}
public function addClassName($name)
$this->_list['class'] .= ' ' . $name;
public function renderElements()
$return = '<ul';
foreach ($this->_list as $attrib => $value) {
$return .= ' ' . $attrib . '="' . $value . '"';
$return .= '>';
$renderRows = $this->renderRows();
if ($renderRows) {
$return .= $renderRows;
$return .= '</ul>';
return $return;
public function renderRows()
$elements = $this->getElements();
$return = '';
foreach ($elements as $element) {
if (!$element->isRendered()) {
$return .= '<li class="row">';
$return = $this->renderLabel($element);
Nip\Form\Renderer\AbstractRenderer::renderLabel()
If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated annotation
ignore-deprecated
$return = /** @scrutinizer ignore-deprecated */ $this->renderLabel($element);
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.
$class = "value " . ($element->getType() == 'input' ? 'input' : '');
$return .= '<span class="' . $class . '">';
$return .= $element->renderElement();
$return .= '</span>';
$return .= $element->renderErrors();
$return .= '</li>';
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.