Test Failed
Push — master ( 4a086f...4834ec )
by vistart
05:02
created

Profile::getIndividualSignRules()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
/**
4
 *  _   __ __ _____ _____ ___  ____  _____
5
 * | | / // // ___//_  _//   ||  __||_   _|
6
 * | |/ // /(__  )  / / / /| || |     | |
7
 * |___//_//____/  /_/ /_/ |_||_|     |_|
8
 * @link https://vistart.me/
9
 * @copyright Copyright (c) 2016 - 2017 vistart
10
 * @license https://vistart.me/license/
11
 */
12
13
namespace rhosocial\organization;
14
15
use Yii;
16
17
/**
18
 * @version 1.0
19
 * @author vistart <[email protected]>
20
 */
21
class Profile extends \rhosocial\user\Profile
22
{
23
    public $hostClass = Organization::class;
24
    public $contentAttribute = 'name';
25
    public $descriptionAttribute = 'description';
26
27
    public function attributeLabels()
28
    {
29
        return [
30
            'guid' => Yii::t('user', 'GUID'),
31
            'name' => Yii::t('organization', 'Name'),
32
            'gravatar_type' => Yii::t('user', 'Gravatar Type'),
33
            'gravatar' => Yii::t('user', 'Gravatar'),
34
            'timezone' => Yii::t('user', 'Timezone'),
35
            'description' => Yii::t('organization', 'Description'),
36
            'created_at' => Yii::t('user', 'Creation Time'),
37
            'updated_at' => Yii::t('user', 'Last Updated Time'),
38
        ];
39
    }
40
41 31
    public function getIndividualSignRules()
42
    {
43 31
        return [];
44
    }
45
46 31
    public function getGenderRules()
47
    {
48 31
        return [];
49
    }
50
51 31
    public function getNameRules()
52
    {
53 31
        return [];
54
    }
55
56
    /**
57
     * @inheritdoc
58
     */
59 31
    public static function tableName()
60
    {
61 31
        return '{{%organization_profile}}';
62
    }
63
64 31
    public function scenarios()
65
    {
66 31
        $scenarios = parent::scenarios();
67 31
        $scenarios[self::SCENARIO_UPDATE] = [
68 31
            $this->contentAttribute, 'gravatar_type', 'gravatar', 'timezone', $this->descriptionAttribute,
69
        ];
70 31
        return $scenarios;
71
    }
72
}
73