50% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have
checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that
someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.
Loading history...
13
14
public static $default_child = 'ForSaleOnePage';
15
16
public static $allowed_children = array('ForSaleOnePage');
The return type could not be reliably inferred; please add a @return annotation.
Our type inference engine in quite powerful, but sometimes the code does not
provide enough clues to go by. In these cases we request you to add a @return
annotation as described here.
Loading history...
19
{
20
$fields = parent::getCMSFields();
21
return $fields;
22
}
23
}
24
25
class ForSaleHolderPage_Controller extends Page_Controller
PSR1 recommends that each class should be in its own file to aid autoloaders.
Having each class in a dedicated file usually plays nice with PSR autoloaders
and is therefore a well established practice. If you use other autoloaders, you
might not want to follow this rule.
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.