Test Failed
Pull Request — master (#11)
by Alexander
05:04
created

BooleanBehaviorMock   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 27
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A behaviors() 0 15 1
1
<?php
2
3
namespace Horat1us\Yii\Tests\Mocks;
4
5
use Horat1us\Yii\Behaviors\BooleanBehavior;
6
use yii\db\ActiveRecord;
7
8
/**
9
 * Class BooleanBehaviorMock
10
 * @package Horat1us\Yii\Tests\Mocks
11
 */
12
class BooleanBehaviorMock extends ActiveRecord
13
{
14
    /** @var  int */
15
    public $intValue;
16
17
    /** @var  bool */
18
    public $boolValue;
19
20
    /**
21
     * @return array
22
     */
23
    public function behaviors()
24
    {
25
        return [
26
            'intBooleanBehavior' => [
27
                'class' => BooleanBehavior::class,
28
                'attributes' => 'intValue',
29
                'returnType' => BooleanBehavior::RETURN_TYPE_INT,
30
            ],
31
            'boolBooleanBehavior' => [
32
                'class' => BooleanBehavior::class,
33
                'attributes' => 'boolValue',
34
                'returnType' => BooleanBehavior::RETURN_TYPE_BOOL,
35
            ],
36
        ];
37
    }
38
}