Code Duplication    Length = 12-12 lines in 3 locations

modules/page/models/Page.php 1 location

@@ 25-36 (lines=12) @@
22
    /**
23
     * @inheritdoc
24
     */
25
    public function behaviors()
26
    {
27
        return [
28
            'timestamp' => [
29
                'class' => TimestampBehavior::className(),
30
                'attributes' => [
31
                    ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at'],
32
                ],
33
                'value' => date('Y-m-d H:i:s'),
34
            ],
35
        ];
36
    }
37
38
    /**
39
     * @inheritdoc

modules/mailTemplate/models/MailTemplate.php 1 location

@@ 30-41 (lines=12) @@
27
    /**
28
     * @inheritdoc
29
     */
30
    public function behaviors()
31
    {
32
        return [
33
            'timestamp' => [
34
                'class' => TimestampBehavior::className(),
35
                'attributes' => [
36
                    ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at'],
37
                ],
38
                'value' => date('Y-m-d H:i:s'),
39
            ],
40
        ];
41
    }
42
43
    /**
44
     * @inheritdoc

modules/user/models/User.php 1 location

@@ 96-107 (lines=12) @@
93
    /**
94
     * @return array
95
     */
96
    public function behaviors()
97
    {
98
        return [
99
            [
100
                'class' => TimestampBehavior::className(),
101
                'attributes' => [
102
                    ActiveRecord::EVENT_BEFORE_INSERT => ['created_at'],
103
                ],
104
                'value' => date('Y-m-d H:i:s'),
105
            ],
106
        ];
107
    }
108
109
    /**
110
     * @inheritdoc