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...
29
{
30
$fields = parent::getCMSFields();
31
$fields->addFieldToTab("Root.Display", new CheckboxField("ShowAllPages", "Show all pages from the start"));
32
return $fields;
33
}
34
}
35
36
class SiteMapPage_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.
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.
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.