Clan::badge()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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