src/Utility/Sort/IdentificationSort.php
protected function sortByScore(Identification $a, Identification $b)
    {
        if (is_null($this->scoreKey)) {
            throw new \BadMethodCallException('The key to sort on must be defined using SetScoreKey() prior to sorting.');
        }
        
        if ($a->getScore($this->scoreKey) == $b->getScore($this->scoreKey)) {
            return 0;
        }
        
        return $a->getScore($this->scoreKey) > $b->getScore($this->scoreKey) ? $this->returnTrue : $this->returnFalse;
    }
protected function sortByScore(Identification $a, Identification $b)
    {
        if (is_null($this->scoreKey)) {
            throw new \BadMethodCallException('The key to sort on must be defined using SetScoreKey() prior to sorting.');
        }
        
        if ($a->getScore($this->scoreKey) == $b->getScore($this->scoreKey)) {
            return 0;
        }
        
        return $a->getScore($this->scoreKey) > $b->getScore($this->scoreKey) ? $this->returnTrue : $this->returnFalse;
    }
protected function sortByScore ( Identification $ a , Identification $ b ) { if ( is_null ( $ this -> scoreKey ) ) { throw new \ BadMethodCallException ( 'The key to sort on must be defined using SetScoreKey() prior to sorting.' ) ; } if ( $ a -> getScore ( $ this -> scoreKey ) == $ b -> getScore ( $ this -> scoreKey ) ) { return 0 ; } return $ a -> getScore ( $ this -> scoreKey ) > $ b -> getScore ( $ this -> scoreKey ) ? $ this -> returnTrue : $ this -> returnFalse ; }
Sort the identifications by score using the sort order and key provided

@param Identification $a
@param Identification $b
@throws \BadMethodCallException Thrown if the key has not been specified
@return int
Sort the identifications by score using the sort order and key provided