<commit_before><?php

// Copyright (c) ppy Pty Ltd <<EMAIL>>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.

namespace App\Http\Controllers\OAuth;

use App\Http\Controllers\Controller;
use App\Http\Middleware\AuthApi;

/**
 * @group OAuth Tokens
 */
class TokensController extends Controller
{
    public function __construct()
    {
        parent::__construct();

        $this->middleware('auth');
    }

    /**
     * Revoke current token
     *
     * Revokes currently authenticated token.
     *
     * @authenticated
     *
     * @response 204
     */
    public function destroyCurrent()
    {
        $token = request()->get(AuthApi::REQUEST_OAUTH_TOKEN_KEY);<commit_msg>Simpler getting current token<commit_after><?php

// Copyright (c) ppy Pty Ltd <<EMAIL>>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.

namespace App\Http\Controllers\OAuth;

use App\Http\Controllers\Controller;

/**
 * @group OAuth Tokens
 */
class TokensController extends Controller
{
    public function __construct()
    {
        parent::__construct();

        $this->middleware('auth');
    }

    /**
     * Revoke current token
     *
     * Revokes currently authenticated token.
     *
     * @authenticated
     *
     * @response 204
     */
    public function destroyCurrent()
    {
        $token = oauth_token();
{'fraction_non_alphanumeric': 0.10810810810810811, 'fraction_numerical': 0.006756756756756757, 'mean_word_length': 2.73989898989899, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 10, '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': '4221602', 'n_tokens_mistral': 439, 'n_tokens_neox': 430, 'n_words': 122}