Completed
Push — master ( 4c7769...90a6b5 )
by Stephen
05:33
created

Organisations::findMembers()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 1
b 0
f 1
cc 1
eloc 2
nc 1
nop 3
crap 1
1
<?php
2
3
namespace StarCitizen\Organisations;
4
5
use StarCitizen\Base\StarCitizenAbstract;
6
use StarCitizen\Models\Organisation;
7
use StarCitizen\Models\Store;
8
9
/**
10
 * Class Organisations
11
 *
12
 * @package StarCitizen\Orginisations;
13
 */
14
final class Organisations extends StarCitizenAbstract
15
{
16
17
    const ORG = 'single_organization';
18
    const MEMBERS = 'organization_members';
19
    const BASEPROFILE = Organisations::ORG;
20
21
    /**
22
     * Model map
23
     */
24
    const MODELS = [
25
        Organisations::ORG => '\Organisation',
26
        Organisations::MEMBERS => ['\OrgMember', '', 'handle']
27
    ];
28
29
    /**
30
     * @var string
31
     */
32
    protected static $system = "organizations";
33
34
35
    /**
36
     * @param $id
37
     * @param bool $cache
38
     * @param bool $raw
39
     *
40
     * @return bool|Organisation
41
     */
42 3
    final public static function findOrg($id, $cache = false, $raw = false)
0 ignored issues
show
Coding Style introduced by
Unnecessary FINAL modifier in FINAL class
Loading history...
43
    {
44 3
        return self::find($id, Organisations::ORG, $cache, $raw);
45
    }
46
47
    /**
48
     * @param $id
49
     * @param bool $cache
50
     * @param bool $raw
51
     *
52
     * @return bool|Store
53
     */
54 3
    final public static function findMembers($id, $cache = false, $raw = false)
0 ignored issues
show
Coding Style introduced by
Unnecessary FINAL modifier in FINAL class
Loading history...
55
    {
56 3
        return self::find($id, Organisations::MEMBERS, $cache, $raw);
57
    }
58
}