Example #1
0
 /**
  * Return the score of an object
  *
  * @param object|ScorableInterface $item
  * @return float
  */
 public function scoreObject($item)
 {
     if ($item instanceof ScorableInterface) {
         return (double) $item->getScore();
     } else {
         return self::DEFAULT_SCORE;
     }
 }