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

Organisations   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 5
Bugs 0 Features 2
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 45
ccs 4
cts 4
cp 1
rs 10
c 5
b 0
f 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A findOrg() 0 4 1
A findMembers() 0 4 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
}