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

Group   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 1
cbo 2
dl 0
loc 29
ccs 15
cts 15
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
B GetGroupSummary() 0 26 2
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