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...
18
{
19
$count = DB::query("Select COUNT(ID) c FROM EcommerceVote WHERE PageID = ".$this->owner->ID);
20
foreach ($count as $item) {
21
return $item["c"];
22
}
23
return 0;
24
}
25
26
public function updateCMSFields(FieldSet &$fields)
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.