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

Clan::badge()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
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