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

WarPlayer   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 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
}