Completed
Push — Laravel4 ( 02d48b...8c5149 )
by Travis
03:47 queued 03:02
created

Group   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 13 2
1
<?php namespace Syntax\SteamApi\Containers;
2
3
use Syntax\SteamApi\Client;
4
use Syntax\SteamApi\Collection;
5
use Syntax\SteamApi\Containers\Group\Details;
6
use Syntax\SteamApi\Containers\Group\MemberDetails;
7
8
class Group {
9
10
	public $groupID64;
11
12
	public $groupDetails;
13
14
	public $memberDetails;
15
16
	public $startingMember;
17
18
	public $members;
19
20
	/**
21
	 * @param \SimpleXMLElement $group
22
	 */
23
	function __construct($group)
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...
24
	{
25
		$this->groupID64      = (string)$group->groupID64;
26
		$this->groupDetails   = new Details($group->groupDetails);
27
		$this->memberDetails  = new MemberDetails($group->groupDetails);
28
		$this->startingMember = (int)(string)$group->startingMember;
29
30
		$this->members = new Collection;
31
32
		foreach ($group->members->steamID64 as $member) {
33
			$this->members->add((new Client)->convertId((int)(string)$member));
34
		}
35
	}
36
37
38
}