Clan   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A badge() 0 4 1
A membersCount() 0 4 1
1
<?php
2
3
namespace ClashOfClans\Api\Clan;
4
5
use ClashOfClans\Api\AbstractResource;
6
use ClashOfClans\Api\Location\Location;
7
8
/**
9
 * @method string name()
10
 * @method string tag()
11
 * @method string type()
12
 * @method Location location()
13
 * @method string warFrequency()
14
 * @method int clanLevel()
15
 * @method int warWins()
16
 * @method int clanPoints()
17
 * @method MemberList memberList()
18
 * @method int rank()
19
 * @method int previousRank()
20
 */
21
class Clan extends AbstractResource
22
{
23
24
    protected $casts = [
25
        'location' => Location::class,
26
        'badgeUrls' => Badge::class,
27
        'memberList' => MemberList::class
28
    ];
29
30
    /**
31
     * @return Badge|null
32
     */
33
    public function badge()
34
    {
35
        return $this->get('badgeUrls');
36
    }
37
38
    public function membersCount()
39
    {
40
        return $this->get('members');
41
    }
42
}
43