MultipleTreeNode64   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 3
dl 0
loc 41
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A tableName() 0 4 1
A find() 0 4 1
A behaviors() 0 10 1
A transactions() 0 6 1
1
<?php
2
/**
3
 * @link https://github.com/paulzi/yii2-nested-intervals
4
 * @copyright Copyright (c) 2015 PaulZi <[email protected]>
5
 * @license MIT (https://github.com/paulzi/yii2-nested-intervals/blob/master/LICENSE)
6
 */
7
8
namespace paulzi\nestedintervals\tests\models;
9
10
use paulzi\nestedintervals\NestedIntervalsBehavior;
11
12
/**
13
 * @author PaulZi <[email protected]>
14
 *
15
 * @property integer $id
16
 * @property integer $tree
17
 * @property integer $lft
18
 * @property integer $rgt
19
 * @property integer $depth
20
 * @property string $slug
21
 *
22
 * @property Node[] $parents
23
 * @property Node $parent
24
 * @property Node $root
25
 * @property Node[] $descendants
26
 * @property Node[] $children
27
 * @property Node[] $leaves
28
 * @property Node $prev
29
 * @property Node $next
30
 *
31
 * @method static MultipleTreeNode64|null findOne() findOne($condition)
32
 *
33
 * @mixin NestedIntervalsBehavior
34
 */
35
class MultipleTreeNode64 extends \yii\db\ActiveRecord
36
{
37
    /**
38
     * @inheritdoc
39
     */
40 74
    public static function tableName()
41
    {
42 74
        return '{{%multiple_tree_64}}';
43
    }
44
    /**
45
     * @inheritdoc
46
     */
47 74
    public function behaviors()
48
    {
49
        return [
50 74
            'tree' => [
51 74
                'class' => NestedIntervalsBehavior::className(),
0 ignored issues
show
Deprecated Code introduced by
The method yii\base\BaseObject::className() has been deprecated with message: since 2.0.14. On PHP >=5.5, use `::class` instead.

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
52 74
                'treeAttribute' => 'tree',
53
                'range' => [0, 9223372036854775807],
54
            ],
55
        ];
56
    }
57
58
    /**
59
     * @inheritdoc
60
     */
61 50
    public function transactions()
62
    {
63
        return [
64 50
            self::SCENARIO_DEFAULT => self::OP_ALL,
65
        ];
66
    }
67
68
    /**
69
     * @return NodeQuery
70
     */
71 74
    public static function find()
72
    {
73 74
        return new NodeQuery(get_called_class());
74
    }
75
}