protected function fetchResult(array $results, string $username): array
    {
        if (count($results) > 1) {
            throw new \Caridea\Auth\Exception\UsernameAmbiguous($username);
        } elseif (count($results) == 0) {
            throw new \Caridea\Auth\Exception\UsernameNotFound($username);
        }
        return current($results);
    }
protected function fetchResult(array $results, string $username): array
    {
        if (count($results) > 1) {
            throw new \Caridea\Auth\Exception\UsernameAmbiguous($username);
        } elseif (count($results) == 0) {
            throw new \Caridea\Auth\Exception\UsernameNotFound($username);
        }
        return current($results);
    }
protected function fetchResult ( array $ results , string $ username ) : array { if ( count ( $ results ) > 1 ) { throw new \ Caridea \ Auth \ Exception \ UsernameAmbiguous ( $ username ) ; } elseif ( count ( $ results ) == 0 ) { throw new \ Caridea \ Auth \ Exception \ UsernameNotFound ( $ username ) ; } return current ( $ results ) ; }
Fetches a single result from the database resultset.

@param array $results The results as returned from `fetchAll`
@param string $username The attempted username (for Exception purposes)
@return array A single database result
@throws \Caridea\Auth\Exception\UsernameAmbiguous If there is more than 1 result
@throws \Caridea\Auth\Exception\UsernameNotFound If there are 0 results
Fetches a single result from the database resultset .