Completed
Push — master ( a1b70a...dd69ef )
by Ezra
02:32
created

Id::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 9
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 13
ccs 9
cts 9
cp 1
rs 9.8333
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Syntax\SteamApi\Containers;
4
5
use Syntax\SteamApi\Client;
6
7
class Id
8
{
9
    public $id32;
10
11
    public $id64;
12
13
    public $id3;
14
15
    public $communityId;
16
17
    public $steamId;
18
19
    /**
20
     * @param integer $id
21
     */
22 4
    function __construct($id)
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...
23
    {
24 4
        $client = new Client;
25
26 4
        $steamIds = $client->convertId($id);
27
28 4
        $this->id32 = $steamIds->id32;
29 4
        $this->id64 = $steamIds->id64;
30 4
        $this->id3  = $steamIds->id3;
31
32 4
        $this->steamId     = $this->id64;
33 4
        $this->communityId = $this->id32;
34 4
    }
35
}
36