Completed
Push — master ( 6dc6fd...57abcf )
by Travis
13:02
created

Group::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Syntax\SteamApi\Steam;
4
5
use Syntax\SteamApi\Client;
6
use Syntax\SteamApi\Containers\Group as GroupContainer;
7
8 2
class Group extends Client
9
{
10 2
    public function GetGroupSummary($group)
11 2
    {
12
        // Set up the api details
13 2
        $this->method = 'memberslistxml';
14
15
        if (is_numeric($group)) {
16 2
            $this->url = 'http://steamcommunity.com/gid/';
17
        } else {
18 2
            $this->url = 'http://steamcommunity.com/groups/';
19 1
        }
20 1
21 1
        $this->url = $this->url . $group;
22
23
        // Set up the arguments
24 2
        $arguments = [
25
            'xml' => 1,
26
        ];
27 1
28 2
        // Get the client
29 2
        $client = $this->setUpXml($arguments);
30
31
        // Clean up the games
32 2
        $group = new GroupContainer($client);
33
34
        return $group;
35 2
    }
36
}
37