Passed
Pull Request — master (#19)
by
unknown
01:50
created

LegendStatistics   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
namespace ClashApi\Models
4
{
5
    use ClashApi\Models\LegendLeagueTournamentSeasonResult;
6
    
7
    class LegendStatistics
8
    {
9
        public $legendTrophies;
10
11
        /**
12
         * @var LegendLeagueTournamentSeasonResult
13
         */
14
        public $currentSeason;
15
16
        /**
17
         * @var LegendLeagueTournamentSeasonResult
18
         */
19
        public $previousSeason;
20
21
        /**
22
         * @var LegendLeagueTournamentSeasonResult
23
         */
24
        public $bestSeason;
25
26
        /**
27
         * @param stdClass
28
         */
29
        public function __construct($stdClass)
30
        {
31
            $this->legendTrophies = $stdClass->legendTrophies;
32
            $this->currentSeason  = new LegendLeagueTournamentSeasonResult($stdClass->currentSeason);
33
            $this->previousSeason = new LegendLeagueTournamentSeasonResult($stdClass->previousSeason);
34
            $this->bestSeason     = new LegendLeagueTournamentSeasonResult($stdClass->bestSeason);
35
        }
36
    }
37
}