Completed
Pull Request — master (#110)
by
unknown
01:32
created

Details   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 36
ccs 0
cts 11
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 13 1
1
<?php
2
3
namespace Syntax\SteamApi\Containers\Group;
4
5
use Syntax\SteamApi\Containers\BaseContainer;
6
7
class Details extends BaseContainer
8
{
9
    public $name;
10
11
    public $url;
12
13
    public $headline;
14
15
    public $summary;
16
17
    public $avatarIcon;
18
19
    public $avatarMedium;
20
21
    public $avatarFull;
22
23
    public $avatarIconUrl;
24
25
    public $avatarMediumUrl;
26
27
    public $avatarFullUrl;
28
29
    function __construct($details)
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
30
    {
31
        $this->name            = (string)$details->groupName;
32
        $this->url             = (string)$details->groupUrl;
33
        $this->headline        = (string)$details->headline;
34
        $this->summary         = (string)$details->summary;
35
        $this->avatarIcon      = $this->getImageForAvatar((string)$details->avatarIcon);
36
        $this->avatarMedium    = $this->getImageForAvatar((string)$details->avatarMedium);
37
        $this->avatarFull      = $this->getImageForAvatar((string)$details->avatarFull);
38
        $this->avatarIconUrl   = (string)$details->avatarIcon;
39
        $this->avatarMediumUrl = (string)$details->avatarMedium;
40
        $this->avatarFullUrl   = (string)$details->avatarFull;
41
    }
42
}
43