Completed
Push — master ( ca2c75...b8437a )
by Travis
02:25
created

GameDetails   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 20
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 2
1
<?php
2
3
namespace Syntax\SteamApi\Containers;
4
5
class GameDetails extends BaseContainer
6
{
7
    public $gameId;
8
9
    public $serverIp;
10
11
    public $serverSteamId;
12
13
    public $extraInfo;
14
15
    public function __construct($gameDetails)
16
    {
17
        $gameId = $this->checkIssetField($gameDetails, 'gameid');
18
19
        $this->serverIp      = $this->checkIssetField($gameDetails, 'gameserverip');
20
        $this->serverSteamId = $this->checkIssetField($gameDetails, 'gameserversteamid');
21
        $this->extraInfo     = $this->checkIssetField($gameDetails, 'gameextrainfo');
22
        $this->gameId        = is_null($gameId) ? null : (int)$gameId;
23
    }
24
}
25