Test Failed
Branch trunk (412648)
by SuperNova.WS
03:40
created

RecordAlliance::ptlArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 22
Code Lines 20

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 20
nc 1
nop 0
dl 0
loc 22
rs 9.2
c 0
b 0
f 0
1
<?php
2
/**
3
 * Created by Gorlum 15.06.2017 10:37
4
 */
5
6
namespace Alliance;
7
8
9
use DBAL\ActiveRecord;
10
11
/**
12
 * Class RecordAlliance
13
 *
14
 * @package Alliance
15
 *
16
 * @property string     $tag
17
 * @property string     $name
18
 * @property int        $createdUnixTime
19
 * @property int|string $ownerId
20
 * @property string     $ownerRankName
21
 * @property string     $description
22
 * @property string     $webPageUrl
23
 * @property string     $textInternal
24
 * @property int        $isLogoPresent
25
 * @property string     $requestTemplate
26
 * @property int        $isRequestsDisabled
27
 * @property int        $membersCount
28
 * @property float      $statPosition
29
 * @property float      $statPoints
30
 * @property string     $titleList
31
 * @property string     $oldTitleList
32
 * @property int|string $parentPlayerRecordId
33
 */
34
class RecordAlliance extends ActiveRecord {
35
36
  protected static $_fieldsToProperties = [
37
    'ally_tag'              => 'tag',
38
    'ally_name'             => 'name',
39
    'ally_register_time'    => 'createdUnixTime',
40
    'ally_owner'            => 'ownerId',
41
    'ally_owner_range'      => 'ownerRankName',
42
    'ally_description'      => 'description',
43
    'ally_web'              => 'webPageUrl',
44
    'ally_text'             => 'textInternal',
45
    'ally_image'            => 'isLogoPresent',
46
    'ally_request'          => 'requestTemplate',
47
    'ally_request_notallow' => 'isRequestsDisabled',
48
    'ally_members'          => 'membersCount',
49
    'total_rank'            => 'statPosition',
50
    'total_points'          => 'statPoints',
51
    'ranklist'              => 'titleList',
52
    'ally_ranks'            => 'oldTitleList',
53
    'ally_user_id'          => 'parentPlayerRecordId',
54
  ];
55
56
57
  /**
58
   * @param array $array
0 ignored issues
show
Bug introduced by
There is no parameter named $array. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
59
   *
60
   * @return array
61
   */
62
  public function ptlArray() {
63
    return [
64
      'ID'                   => $this->id,
65
      'TAG'                  => $this->tag,
66
      'NAME'                 => $this->name,
67
      'CREATED'              => $this->createdUnixTime,
68
      'OWNER_ID'             => $this->ownerId,
69
      'OWNER_RANK_NAME'      => $this->ownerRankName,
70
      'DESCRIPTION'          => $this->description,
71
      'WEB_PAGE'             => $this->webPageUrl,
72
      'TEXT_INTERNAL'        => $this->textInternal,
73
      'HAVE_LOGO'            => $this->isLogoPresent,
74
      'REQUEST_TEMPLATE'     => $this->requestTemplate,
75
      'REQUESTS_NOT_ALLOWED' => $this->isRequestsDisabled,
76
      'MEMBER_COUNT'         => $this->membersCount,
77
      'STAT_POSITION'        => $this->statPosition,
78
      'STAT_POINTS'          => $this->statPoints,
79
      'TITLE_LIST_UNPARSED'  => $this->titleList,
80
      'OLD_TITLE_LIST'       => $this->oldTitleList,
81
      'PARENT_PLAYER_ID'     => $this->parentPlayerRecordId,
82
    ];
83
  }
84
85
}
86