<commit_before><?php

namespace TruckersMP\Models;

use Carbon\Carbon;

class GameTimeModel
{
    /**
     * @var Carbon
     */
    public $time;

    /**
     * GameTimeModel constructor.
     *
     * @param array $response
     * @throws \Exception
     */
    public function __construct(array $response)
    {
        if ($response['error']) {
            throw new \Exception($response['error']);
        }
<commit_msg>Throw APIErrorException if there's a gametime endpoint error<commit_after><?php

namespace TruckersMP\Models;

use Carbon\Carbon;
use TruckersMP\Exceptions\APIErrorException;

class GameTimeModel
{
    /**
     * @var Carbon
     */
    public $time;

    /**
     * GameTimeModel constructor.
     *
     * @param array $response
     * @throws \Exception
     */
    public function __construct(array $response)
    {
        if ($response['error']) {
            throw new APIErrorException($response['error']);
        }

{'fraction_non_alphanumeric': 0.11882229232386961, 'fraction_numerical': 0.0, 'mean_word_length': 2.363957597173145, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '6317277', 'n_tokens_mistral': 280, 'n_tokens_neox': 271, 'n_words': 63}