GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

UserProfile::rules()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 7
rs 10
c 0
b 0
f 0
ccs 4
cts 4
cp 1
crap 1
1
<?php
2
/**
3
 * @author Alexey Tatarinov <[email protected]>
4
 * @link https://github.com/shogodev/argilla/
5
 * @copyright Copyright &copy; 2003-2014 Shogo
6
 * @license http://argilla.ru/LICENSE
7
 * @package frontend.models.user
8
 *
9
 * @method static UserProfile model(string $class = __CLASS__)
10
 *
11
 * @property integer $user_id
12
 * @property string $name
13
 * @property string $last_name
14
 * @property string $patronymic
15
 * @property string $address
16
 * @property string $phone
17
 * @property string $birthday
18
 * @property string $discount
19
 */
20
class UserProfile extends FActiveRecord
21
{
22 9
  public function rules()
23
  {
24
    return array(
25 9
      array('name', 'required', 'except' => User::SCENARIO_REGISTRATION),
26 9
      array('name, last_name, patronymic, address, birthday, phone', 'safe'),
27 9
    );
28
  }
29
30 9
  public function behaviors()
31
  {
32
    return array(
33
      'dateFormatBehavior' => array(
34 9
        'class' => 'DateFormatBehavior',
35 9
        'attribute' => 'birthday',
36
      )
37 9
    );
38
  }
39
40 3 View Code Duplication
  public function attributeLabels()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
41
  {
42 3
    return CMap::mergeArray(parent::attributeLabels(), array(
43 3
      'name' => 'Имя',
44 3
      'last_name' => 'Фамилия',
45 3
      'patronymic' => 'Отчество',
46 3
      'phone' => 'Контактный телефон',
47 3
      'address' => 'Адрес',
48 3
      'bicycle' => 'Модель велосипеда',
49 3
      'birthday' => 'Дата рождения',
50
      'discount' => 'Персональная скидка'
51 3
    ));
52
  }
53
}