<commit_before><?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Models\VerifyCode;
use App\Exceptions\MessageResponseBody;
use Illuminate\Http\Request;

class AuthController extends Controller
{
    public function getPhoneCode(Request $request)
    {
        $vaildSecond = 60;
        $phone = $request->input('phone');
        $verfiy = VerifyCode::byAccount($phone)->byValid($vaildSecond)->first();


        if ($verfiy) {
            return app(MessageResponseBody::class, [
                'code' => 1008,
                'data' => $verfiy->makeSurplusSecond($vaildSecond),
            ]);
        }

        $verify = new VerifyCode();
        $verify->accound = $phone;
        $verify->makeVerifyCode();

    }

    /**
     * 注册用户.
     *
     * @param Request $request 请求对象
     *
     * @return Response 返回对象
     *
     * @author <NAME> <<EMAIL>>
     * @homepage http://medz.cn
     */
    public function register(Request $request)
    {
        $username = $request->input('username');
        $phone = $request->input('phone');
        $password = $request->input('password');
    }
}<commit_msg>test code.<commit_after><?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Models\VerifyCode;
use App\Exceptions\MessageResponseBody;
use Illuminate\Http\Request;

class AuthController extends Controller
{
    public function getPhoneCode(Request $request)
    {
        $vaildSecond = 60;
        $phone = $request->input('phone');
        $verfiy = VerifyCode::byAccount($phone)->byValid($vaildSecond)->first();


        if ($verfiy) {
            return app(MessageResponseBody::class, [
                'code' => 1008,
                'data' => $verfiy->makeSurplusSecond($vaildSecond),
            ]);
        }

        $verify = new VerifyCode();
        $verify->accound = $phone;
        $verify->makeVerifyCode();
        $verify->data = [
            'code' => $verify->code,
        ];

        var_dump($verify);

    }

    /**
     * 注册用户.
     *
     * @param Request $request 请求对象
     *
     * @return Response 返回对象
     *
     * @author <NAME> <<EMAIL>>
     * @homepage http://medz.cn
     */
    public function register(Request $request)
    {
        $username = $request->input('username');
        $phone = $request->input('phone');
        $password = $request->input('password');
    }
}
{'fraction_non_alphanumeric': 0.14873286248442044, 'fraction_numerical': 0.004985459077690071, 'mean_word_length': 2.2717391304347827, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 34, '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': '663277', 'n_tokens_mistral': 751, 'n_tokens_neox': 744, 'n_words': 129}