for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
class Nip_Form_Element_RadioGroup extends Nip_Form_Element_Input_Group
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.
{
protected $_type = 'radioGroup';
/**
* @return Nip_Form_Element_Abstract
*/
public function getNewElement()
$element = $this->getForm()->getNewElement('radio');
$element->setName($this->getName());
$this->getName()
Nip\Form\Elements\AbstractElement::getName()
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 $element;
}
* @param $value
* @return $this
public function setValue($value)
$elements = $this->getElements();
foreach ($elements as $element) {
if ($element->getValue() == $value) {
$element->setChecked(true);
break;
return parent::setValue($value);
* @param $boolean
* @return Nip_Form_Element_RadioGroup
public function autoSelectFirst($boolean = true)
return $this->setOption('autoSelectFirst', $boolean === true);
* @return bool
public function isAutoSelectFirst()
if ($this->hasOption('autoSelectFirst') && $this->getOption('autoSelectFirst') == false) {
$this->getOption('autoSelectFirst')
Nip\Form\Elements\AbstractElement::getOption()
return false;
return true;
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.