Completed
Push — master ( 58a298...242dd2 )
by vistart
17:50
created

BaseRedisMessageModel   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
c 2
b 0
f 0
lcom 1
cbo 2
dl 0
loc 18
ccs 9
cts 9
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A init() 0 11 3
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\queries\BaseRedisMessageQuery;
16
use vistart\Models\traits\MessageTrait;
17
18
/**
19
 * Description of BaseRedisMessageModel
20
 *
21
 * @author vistart <[email protected]>
22
 */
23
abstract class BaseRedisMessageModel extends BaseRedisBlameableModel
24
{
25
    use MessageTrait;
26
27
    public $updatedByAttribute = false;
28
29 3
    public function init()
30
    {
31 3
        if (!is_string($this->queryClass)) {
32 3
            $this->queryClass = BaseRedisMessageQuery::className();
33 3
        }
34 3
        if ($this->skipInit) {
35 3
            return;
36
        }
37 3
        $this->initMessageEvents();
38 3
        parent::init();
39 3
    }
40
}
41