Completed
Push — master ( 8e3c70...7c4bfd )
by vistart
07:52 queued 01:35
created

BaseMongoNotificationModel   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 6
Bugs 0 Features 1
Metric Value
wmc 1
c 6
b 0
f 1
lcom 0
cbo 2
dl 0
loc 15
ccs 4
cts 4
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A init() 0 5 1
1
<?php
2
3
/**
4
 *  _   __ __ _____ _____ ___  ____  _____
5
 * | | / // // ___//_  _//   ||  __||_   _|
6
 * | |/ // /(__  )  / / / /| || |     | |
7
 * |___//_//____/  /_/ /_/ |_||_|     |_|
8
 * @link https://vistart.name/
9
 * @copyright Copyright (c) 2016 vistart
10
 * @license https://vistart.name/license/
11
 */
12
13
namespace vistart\Models\models;
14
15
use vistart\Models\traits\NotificationTrait;
16
17
/**
18
 * Description of BaseMongoNotificationModel
19
 *
20
 * @author vistart <[email protected]>
21
 */
22
abstract class BaseMongoNotificationModel extends BaseMongoBlameableModel
23
{
24
    use NotificationTrait;
25
26
    public $expiredAt = 604800;
27
    public $guidAttribute = 'guid';
28
    public $updatedAtAttribute = false;
29
    public $updatedByAttribute = false;
30
31 3
    public function init()
32
    {
33 3
        $this->on(static::EVENT_AFTER_DELETE, [$this, 'onDeleteNotificationRead']);
34 3
        parent::init();
35 3
    }
36
}
37