Passed
Pull Request — master (#20)
by
unknown
01:59
created

WarPlayer::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 1
1
<?php
2
3
namespace PoLaKoSz\CoC_API\Models
4
{
5
    use PoLaKoSz\CoC_API\Models\MinimalPlayer;
6
7
    class WarPlayer extends MinimalPlayer
8
    {
9
        /**
10
         * @var int
11
         */
12
        public $townhallLevel;
13
        
14
        /**
15
         * @var int
16
         */
17
        public $mapPosition;
18
        
19
        public $opponentAttacks;
20
21
        /**
22
         * @param stdClass
23
         */
24
        public function __construct($stdClass)
25
        {
26
            parent::__construct( $stdClass );
27
            
28
            $this->townhallLevel   = $stdClass->townhallLevel;
29
            $this->mapPosition     = $stdClass->mapPosition;
30
            $this->opponentAttacks = $stdClass->opponentAttacks;
31
        }
32
    }
33
}