Accounts   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 17
Bugs 1 Features 6
Metric Value
wmc 3
c 17
b 1
f 6
lcom 0
cbo 1
dl 0
loc 49
ccs 9
cts 9
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A findProfile() 0 5 1
A findThreads() 0 5 1
A findPosts() 0 5 1
1
<?php
2
3
namespace StarCitizen\Accounts;
4
5
use StarCitizen\Models\Profile;
6
use StarCitizen\Models\Store;
7
use StarCitizen\StarCitizens;
8
9
/**
10
 * Class Accounts
11
 *
12
 * @package StarCitizen\Accounts;
13
 */
14
class Accounts
15
{
16
    /**
17
     * Constants Profile Types
18
     */
19
    const FULL = "full_profile";
20
    const THREADS = "threads";
21
    const POSTS = "posts";
22
    const BASEPROFILE = Accounts::FULL;
23
24
    /**
25
     * @param $id
26
     * @param bool $cache
27
     * @param bool $raw
28
     *
29
     * @return bool|Profile|string
30
     */
31 4
    public static function findProfile($id, $cache = false, $raw = false)
32
    {
33 4
        $starCitizens = new StarCitizens();
34 4
        return $starCitizens->accounts($id, self::BASEPROFILE, $cache, $raw);
35
    }
36
37
    /**
38
     * @param $id
39
     * @param bool $cache
40
     * @param bool $raw
41
     *
42
     * @return bool|Store|string
43
     */
44 3
    public static function findThreads($id, $cache = false, $raw = false)
45
    {
46 3
        $starCitizens = new StarCitizens();
47 3
        return $starCitizens->accounts($id, Accounts::THREADS, $cache, $raw);
48
    }
49
50
    /**
51
     * @param $id
52
     * @param bool $cache
53
     * @param bool $raw
54
     *
55
     * @return bool|Store|string
56
     */
57 10
    public static function findPosts($id, $cache = false, $raw = false)
58
    {
59 10
        $starCitizens = new StarCitizens();
60 10
        return $starCitizens->accounts($id, Accounts::POSTS, $cache, $raw);
61
    }
62
}