Completed
Push — master ( b1d0ff...f51f35 )
by Toni
04:43
created

Clan   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

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