<commit_before><?php namespace App\Http\Controllers;

class AjaxBeacon extends Controller
{
    public function store()
    {
        foreach (json_decode(request('events')) as $event) {
            if (!isset($event->event)) {
                continue;
            }

            $method = "process{$event->event}Event";

            if (method_exists($this, $method)) {
                $this->{$method}($event);
            }
        }

        return response('', 204);
    }

    protected function processNewsViewedEvent($event)
    {
        event(new \App\Events\Stats\NewsViewed($event->id));
    }

    protected function processTorrentViewedEvent($event)
    {
        event(new \App\Events\Stats\TorrentViewed($event->id));
    }
}<commit_msg>Ответ 200 от beacon<commit_after><?php namespace App\Http\Controllers;

class AjaxBeacon extends Controller
{
    public function store()
    {
        foreach (json_decode(request('events')) as $event) {
            if (!isset($event->event)) {
                continue;
            }

            $method = "process{$event->event}Event";

            if (method_exists($this, $method)) {
                $this->{$method}($event);
            }
        }

        return response('', 200)
            ->header('Access-Control-Allow-Origin', '*');
    }

    protected function processNewsViewedEvent($event)
    {
        event(new \App\Events\Stats\NewsViewed($event->id));
    }

    protected function processTorrentViewedEvent($event)
    {
        event(new \App\Events\Stats\TorrentViewed($event->id));
    }
}
{'fraction_non_alphanumeric': 0.14194780394653086, 'fraction_numerical': 0.005728835136855506, 'mean_word_length': 2.144, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 14, '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': '3204687', 'n_tokens_mistral': 462, 'n_tokens_neox': 435, 'n_words': 76}