Completed
Pull Request — Laravel4 (#36)
by
unknown
10:35
created

Group   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
B GetGroupSummary() 0 26 2
1
<?php namespace Syntax\SteamApi\Steam;
2
3
use Syntax\SteamApi\Client;
4
use Syntax\SteamApi\Containers\Group as GroupContainer;
5
6
class Group extends Client {
7
8
	public function __construct()
9
	{
10
		parent::__construct();
11
	}
12
13
	public function GetGroupSummary($group)
14
	{
15
		// Set up the api details
16
		$this->method  = 'memberslistxml';
17
18
		if (is_numeric($group)) {
19
			$this->url = 'http://steamcommunity.com/gid/';
20
		} else {
21
			$this->url = 'http://steamcommunity.com/groups/';
22
		}
23
24
		$this->url = $this->url . $group;
25
26
		// Set up the arguments
27
		$arguments = [
28
			'xml' => 1
29
		];
30
31
		// Get the client
32
		$client = $this->setUpXml($arguments);
33
34
		// Clean up the games
35
		$group = new GroupContainer($client);
36
37
		return $group;
38
	}
39
40
}