<commit_before><?php

namespace App\CustomFacades\Classes;

use App\ApiKey;

class GoogleApi
{
    /**
     * 取得一組GoogleAPI金鑰
     *
     * @return string
     */
    public function getKey()
    {
        //取得目前使用最少次的ApiKey
        /** @var ApiKey $apiKey */
        $apiKey = ApiKey::query()->orderBy('count')->first();
        if (!$apiKey) {
            return 'No ApiKey exists';
        }
        //更新使用次數
        $apiKey->update([
            'count'       => $apiKey->count + 1,
            'total_count' => $apiKey->total_count + 1,
        ]);


        return $apiKey->api_key;
    }
}<commit_msg>Apply fixes from StyleCI (#19)<commit_after><?php

namespace App\CustomFacades\Classes;

use App\ApiKey;

class GoogleApi
{
    /**
     * 取得一組GoogleAPI金鑰
     *
     * @return string
     */
    public function getKey()
    {
        //取得目前使用最少次的ApiKey
        /** @var ApiKey $apiKey */
        $apiKey = ApiKey::query()->orderBy('count')->first();
        if (!$apiKey) {
            return 'No ApiKey exists';
        }
        //更新使用次數
        $apiKey->update([
            'count'       => $apiKey->count + 1,
            'total_count' => $apiKey->total_count + 1,
        ]);

        return $apiKey->api_key;
    }
}
{'fraction_non_alphanumeric': 0.15178571428571427, 'fraction_numerical': 0.00487012987012987, 'mean_word_length': 1.7158590308370043, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '3817734', 'n_tokens_mistral': 432, 'n_tokens_neox': 429, 'n_words': 74}