public function addScore($name, SingleScore $score)
{
$this->getScoreOrCreate($name)->add($score);
$this->totalScore += $score->getScore();
}
public function doPostProcess(NodeInterface $input, Recommendation $recommendation, RecordCursorInterface $result) { if ($result->getRecord()->value('degree') <= 0) { return; } $recommendation->addScore($this->name(), new SingleScore(-($result->getRecord()->value('degree') / 100))); }