<commit_before><?php

namespace app\controllers;

use app\models\CartedProduct;
use app\models\OrderedProduct;
use app\models\ViewedProduct;
use yii\web\Controller;
use app\models\Product;
class ProductController extends Controller
{
    public $layout = false;

    public function actionView($id)
    {
        \Yii::$app->response->format='json';
        $model = new ViewedProduct();
        $model->product_id = $id;
        $model->track_id = \Yii::$app->request->cookies['track_id'];
        $model->save();

        $product = Product::findOne(['id' => $id]);<commit_msg>Change cookies get value<commit_after><?php

namespace app\controllers;

use app\models\CartedProduct;
use app\models\OrderedProduct;
use app\models\ViewedProduct;
use yii\web\Controller;
use app\models\Product;
class ProductController extends Controller
{
    public $layout = false;

    public function actionView($id)
    {
        \Yii::$app->response->format='json';
        $model = new ViewedProduct();
        $model->product_id = $id;
        $model->track_id = \Yii::$app->request->cookies->getValue('track_id');
        $model->save();

        $product = Product::findOne(['id' => $id]);
{'fraction_non_alphanumeric': 0.15436810856658184, 'fraction_numerical': 0.0, 'mean_word_length': 3.5914396887159534, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 20, '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': '3931270', 'n_tokens_mistral': 362, 'n_tokens_neox': 363, 'n_words': 72}