<commit_before><?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "evrnt_note".
 *
 * @property integer $id
 * @property string $text
 * @property integer $creator
 * @property string $date_create
 */
class Note extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'evrnt_note';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['text'                                                                            ], 'required'],
            [['text'], 'string'],
            [['creator'], 'integer'],
            [['date_create'], 'safe']
        ];
    }

    /**
     * Before save new note creator is current user
     * @param bool $insert
     * @return bool
     */
    public function beforeSave ($insert)
    {
        if (parent::beforeSave($insert))<commit_msg>Lesson 4-2<commit_after><?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "evrnt_note".
 *
 * @property integer $id
 * @property string $text
 * @property integer $creator
 * @property string $date_create
 */
class Note extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'evrnt_note';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['text'], 'required'],
            [['text'], 'string'],
            [['creator'], 'integer'],
            [['date_create'], 'safe']
        ];
    }

    /**
     * Before save new note creator is current user
     * @param bool $insert
     * @return bool
     */
    public function beforeSave ($insert)
    {
        if (parent::beforeSave($insert))
{'fraction_non_alphanumeric': 0.13884204609331086, 'fraction_numerical': 0.0011242270938729624, 'mean_word_length': 1.7596899224806202, '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': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6368001', 'n_tokens_mistral': 511, 'n_tokens_neox': 507, 'n_words': 136}