for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
class Nip_Form_Renderer_Elements_Textarea extends Nip_Form_Renderer_Elements_Abstract
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
public function generateElement()
$return = '<textarea ';
$return .= $this->renderAttributes();
$return .= ' >' . $this->getElement()->getValue() . '</textarea>';
$this->getElement()->getValue()
Nip\Form\Elements\AbstractElement::getValue()
This check looks for function or method calls that always return null and whose return value is used.
class A { function getObject() { return null; } } $a = new A(); if ($a->getObject()) {
The method getObject() can return nothing but null, so it makes no sense to use the return value.
getObject()
The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.
return $return;
}
public function getElementAttribs()
$attribs = parent::getElementAttribs();
$attribs[] = 'rows';
$attribs[] = 'cols';
return $attribs;
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.