public static function select($cardId) {
    $card = self::load($cardId);

    $available = array_keys($card['usable']);
    $selected  = Rand::int(0, count($available)-1);

    return $available[$selected];
  }
public static function select($cardId) {
    $card = self::load($cardId);

    $available = array_keys($card['usable']);
    $selected  = Rand::int(0, count($available)-1);

    return $available[$selected];
  }
public static function select ( $ cardId ) { $ card = self :: load ( $ cardId ) ; $ available = array_keys ( $ card [ 'usable' ] ) ; $ selected = Rand :: int ( 0 , count ( $ available ) - 1 ) ; return $ available [ $ selected ] ; }
Select a pre shared OTP from a list that a user can use.

@param string $cardId
Card ID to select a OTP from.

@return integer
OTP ID of a available OTP.
Select a pre shared OTP from a list that a user can use .