Passed
Push — master ( b5549b...886b4c )
by vistart
04:08
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 1
    public function attributeLabels()
28
    {
29
        return [
30 1
            'guid' => Yii::t('user', 'GUID'),
31 1
            'name' => Yii::t('organization', 'Name'),
32 1
            'gravatar_type' => Yii::t('user', 'Gravatar Type'),
33 1
            'gravatar' => Yii::t('user', 'Gravatar'),
34 1
            'timezone' => Yii::t('user', 'Timezone'),
35 1
            'description' => Yii::t('organization', 'Description'),
36 1
            'created_at' => Yii::t('user', 'Creation Time'),
37 1
            'updated_at' => Yii::t('user', 'Last Updated Time'),
38
        ];
39
    }
40
41 35
    public function getIndividualSignRules()
42
    {
43 35
        return [];
44
    }
45
46 35
    public function getGenderRules()
47
    {
48 35
        return [];
49
    }
50
51 35
    public function getNameRules()
52
    {
53 35
        return [];
54
    }
55
56
    /**
57
     * @inheritdoc
58
     */
59 35
    public static function tableName()
60
    {
61 35
        return '{{%organization_profile}}';
62
    }
63
64 35
    public function scenarios()
65
    {
66 35
        $scenarios = parent::scenarios();
67 35
        $scenarios[self::SCENARIO_UPDATE] = [
68 35
            $this->contentAttribute, 'gravatar_type', 'gravatar', 'timezone', $this->descriptionAttribute,
69
        ];
70 35
        return $scenarios;
71
    }
72
}
73