Organisations   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 7
Bugs 1 Features 2
Metric Value
wmc 2
c 7
b 1
f 2
lcom 0
cbo 1
dl 0
loc 32
ccs 6
cts 6
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A findOrg() 0 5 1
A findMembers() 0 5 1
1
<?php
2
3
namespace StarCitizen\Organisations;
4
5
use StarCitizen\StarCitizens;
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
15
{
16
    const ORG = 'single_organization';
17
    const MEMBERS = 'organization_members';
18
    const BASEPROFILE = Organisations::ORG;
19
20
    /**
21
     * @param $id
22
     * @param bool $cache
23
     * @param bool $raw
24
     *
25
     * @return bool|Organisation
26
     */
27 3
    public static function findOrg($id, $cache = false, $raw = false)
28
    {
29 3
        $starCitizens = new StarCitizens();
30 3
        return $starCitizens->organizations($id, Organisations::ORG, $cache, $raw);
31
    }
32
33
    /**
34
     * @param $id
35
     * @param bool $cache
36
     * @param bool $raw
37
     *
38
     * @return bool|Store
39
     */
40 3
    public static function findMembers($id, $cache = false, $raw = false)
41
    {
42 3
        $starCitizens = new StarCitizens();
43 3
        return $starCitizens->organizations($id, Organisations::MEMBERS, $cache, $raw);
44
    }
45
}