<commit_before><?php

class BridgeBB
{
    public static function login($username, $password)
    {
        if (is_null($password)) {
            return self::_error(LOGIN_ERROR_PASSWORD, 'NO_PASSWORD_<PASSWORD>');
        }
        if (is_null($username)) {
            return self::_error(LOGIN_ERROR_USERNAME, 'LOGIN_ERROR_USERNAME');
        }

        return self::_apiValidate($username, $password);
    }

    private static function _apiValidate($username, $password)
    {
        $request = file_get_contents(LARAVEL_URL.'/login/'.BRIDGEBB_API_KEY.'/'.$username.'/'.$password, 'r');
        $oResponse = json_decode($request, true);
        if ($oResponse['code'] === '200') {
            //TODO: Consume returned user account information like email
            self::_handleAuthSuccess($username, $password);<commit_msg>fix bug : phpbb3.0 login_method no return value when success<commit_after><?php

class BridgeBB
{
    public static function login($username, $password)
    {
        if (is_null($password)) {
            return self::_error(LOGIN_ERROR_PASSWORD, '<PASSWORD>');
        }
        if (is_null($username)) {
            return self::_error(LOGIN_ERROR_USERNAME, 'LOGIN_ERROR_USERNAME');
        }

        return self::_apiValidate($username, $password);
    }

    private static function _apiValidate($username, $password)
    {
        $request = file_get_contents(LARAVEL_URL.'/login/'.BRIDGEBB_API_KEY.'/'.$username.'/'.$password, 'r');
        $oResponse = json_decode($request, true);
        if ($oResponse['code'] === '200') {
            //TODO: Consume returned user account information like email
            return self::_handleAuthSuccess($username, $password);
{'fraction_non_alphanumeric': 0.13732394366197184, 'fraction_numerical': 0.004694835680751174, 'mean_word_length': 3.0789473684210527, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '403945', 'n_tokens_mistral': 498, 'n_tokens_neox': 506, 'n_words': 98}