public function getAttemptsLeftWithSameUser(string $userName): int
    {
        $attemptsLeft = ((int) $this->maxAttemptsForUserName) - $this->enhancedAuthenticationMapper->fetchAttemptsWithSameUser($userName, $this->banTimeInSeconds);

        return \max(0, $attemptsLeft);
    }
public function getAttemptsLeftWithSameUser(string $userName): int
    {
        $attemptsLeft = ((int) $this->maxAttemptsForUserName) - $this->enhancedAuthenticationMapper->fetchAttemptsWithSameUser($userName, $this->banTimeInSeconds);

        return \max(0, $attemptsLeft);
    }
public function getAttemptsLeftWithSameUser ( string $ userName ) : int { $ attemptsLeft = ( ( int ) $ this -> maxAttemptsForUserName ) - $ this -> enhancedAuthenticationMapper -> fetchAttemptsWithSameUser ( $ userName , $ this -> banTimeInSeconds ) ; return \ max ( 0 , $ attemptsLeft ) ; }
Return how many attemps are left for incorrect password.

@param string $userName

@return int Number of attempts with same user.
Return how many attemps are left for incorrect password .