public function postProcess(Node $input, Recommendation $recommendation, RecordCursorInterface $result = null) { if (null === $result) { throw new \RuntimeException(sprintf('Expected a non-null result in %s::postProcess()', get_class($this))); } if (count($result->records()) > 0) { foreach ($result->records() as $record) { $recommendation->addScore($this->name(), new SingleScore(1)); } } }