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

League::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
3
namespace ClashApi\Models
4
{
5
    use ClashApi\Models\LeagueIcon;
6
7
    class League
8
    {
9
        /**
10
         * @var int
11
         */
12
        public $id;
13
14
        /**
15
         * @var string
16
         */
17
        public $name;
18
19
        /**
20
         * @var LeagueIcon
21
         */
22
        public $icon;
23
24
        /**
25
         * @param stdClass
26
         */
27
        public function __construct($stdClass)
28
        {
29
            $this->id = $stdClass->id;
30
            $this->name = $stdClass->name;
31
            $this->icon = new LeagueIcon($stdClass->iconUrls);
32
        }
33
    }
34
}