Accounts::findThreads()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 3
Bugs 0 Features 1
Metric Value
c 3
b 0
f 1
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 3
crap 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
}