<commit_before><?php
/**
 * Created by PhpStorm.
 * User: dolgikh
 * Date: 09.08.16
 * Time: 12:14
 */

namespace docflow\models\base\statuses\links;

use docflow\models\base\Document;
use docflow\models\base\operations\Operations;
use docflow\models\statuses\Statuses;
use yii;

class StatusesLinksLog extends Document
{
    /**
     * {@inheritdoc}
     *
     * @return string
     */
    public static function tableName()
    {
        return '{{%doc_statuses_links_log}}';
    }

    /**
     * {@inheritdoc}
     *
     * @return array
     */
    public function rules()
    {
        return [
            [['status_from', 'status_to', 'level', 'operation_log_id', 'doc_id'], 'integer'],
            [['right_tag', 'type', 'changed_attributes'], 'string'],
            ['right_tag', 'match', 'pattern' => '/^[a-zA-Z0-9-_\.]+$/'],
            [
                ['status_from', 'status_to'],
                'exist',
                'targetClass' => Statuses::className(),
                'targetAttribute' => 'id'
            ],
            [
                ['doc_id'],
                'exist',
                'targetClass' => StatusesLinks::className(),
                'targetAttribute' => 'id'
            ],
            [
                ['operation_log_id'],
                'exist',
                'targetClass' => Operations::className(),
                'targetAttribute' => 'id'
            ]
        ];
    }

    /**
     * {@inheritdoc}
     *
     * @return array
     */
    public function attributeLabels()
    {
        return [
            'status_from' => Yii::t('docflow', 'Source Status'),
            'status_to' => Yii::t('docflow', 'Destination Status'),
            'right_tag' => Yii::t('docflow', 'Access Right Tag'),
            'level' => Yii::t('docflow', 'Link Level'),
            'type' => Yii::t('docflow', 'Link Type'),
            'atime' => 'Штамп времени',
            'doc_id' => 'Документ',
            'operation_log_id' => 'Операция в логе'
        ];
    }

    /**
     * This function returns the document tag. This tag is used to get
     * all information about the document type from the database.
     *
     * @return string Document tag
     */
    static public function docTag()
    {
        return '';
    }

    /**
     * Return field name which use how Document `name`
     *
     * @return string Document name
     */
    public function getDocName()
    {
        return '';
    }

    /**
     * Получаем документ по его идентификатору
     *
     * @param integer $nodeId - id документа
     *
     * @return mixed
     */
    public static function getDocumentByNodeId($nodeId)
    {
        return '';
    }
}
<commit_msg>master/master<commit_after><?php
/**
 * Created by PhpStorm.
 * User: dolgikh
 * Date: 09.08.16
 * Time: 12:14
 */

namespace docflow\models\statuses\links;

use docflow\models\base\Document;
use docflow\models\base\operations\Operations;
use docflow\models\statuses\Statuses;
use yii;

class StatusesLinksLog extends Document
{
    /**
     * {@inheritdoc}
     *
     * @return string
     */
    public static function tableName()
    {
        return '{{%doc_statuses_links_log}}';
    }

    /**
     * {@inheritdoc}
     *
     * @return array
     */
    public function rules()
    {
        return [
            [['status_from', 'status_to', 'level', 'operation_log_id', 'doc_id'], 'integer'],
            [['right_tag', 'type', 'changed_attributes'], 'string'],
            ['right_tag', 'match', 'pattern' => '/^[a-zA-Z0-9-_\.]+$/'],
            [
                ['status_from', 'status_to'],
                'exist',
                'targetClass' => Statuses::className(),
                'targetAttribute' => 'id'
            ],
            [
                ['doc_id'],
                'exist',
                'targetClass' => StatusesLinks::className(),
                'targetAttribute' => 'id'
            ],
            [
                ['operation_log_id'],
                'exist',
                'targetClass' => Operations::className(),
                'targetAttribute' => 'id'
            ]
        ];
    }

    /**
     * {@inheritdoc}
     *
     * @return array
     */
    public function attributeLabels()
    {
        return [
            'status_from' => Yii::t('docflow', 'Source Status'),
            'status_to' => Yii::t('docflow', 'Destination Status'),
            'right_tag' => Yii::t('docflow', 'Access Right Tag'),
            'level' => Yii::t('docflow', 'Link Level'),
            'type' => Yii::t('docflow', 'Link Type'),
            'atime' => 'Штамп времени',
            'doc_id' => 'Документ',
            'operation_log_id' => 'Операция в логе'
        ];
    }

    /**
     * This function returns the document tag. This tag is used to get
     * all information about the document type from the database.
     *
     * @return string Document tag
     */
    static public function docTag()
    {
        return '';
    }

    /**
     * Return field name which use how Document `name`
     *
     * @return string Document name
     */
    public function getDocName()
    {
        return '';
    }

    /**
     * Получаем документ по его идентификатору
     *
     * @param integer $nodeId - id документа
     *
     * @return mixed
     */
    public static function getDocumentByNodeId($nodeId)
    {
        return '';
    }
}

{'fraction_non_alphanumeric': 0.1480794210428651, 'fraction_numerical': 0.004453516422341808, 'mean_word_length': 1.690963554667998, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 33, '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': '1549340', 'n_tokens_mistral': 1633, 'n_tokens_neox': 1612, 'n_words': 346}