Settings   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 27
ccs 0
cts 12
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getAll() 0 4 1
A getIsOwnerRequired() 0 4 1
A getIsPublicRegistrationEnabled() 0 4 1
1
<?php
2
3
/**
4
 * @copyright  Copyright (c) Flipbox Digital Limited
5
 * @license    https://flipboxfactory.com/software/organization/license
6
 * @link       https://www.flipboxfactory.com/software/organization/
7
 */
8
9
namespace flipbox\organization\web\twig\variables;
10
11
use flipbox\organization\models\Settings as SettingsModel;
12
use flipbox\organization\Organization as OrganizationPlugin;
13
14
/**
15
 * @author Flipbox Factory <[email protected]>
16
 * @since 1.0.0
17
 */
18
class Settings
19
{
20
21
    /**
22
     * @return SettingsModel
23
     */
24
    public function getAll()
25
    {
26
        return OrganizationPlugin::getInstance()->getSettings();
27
    }
28
29
    /**
30
     * @return bool
31
     */
32
    public function getIsOwnerRequired()
33
    {
34
        return OrganizationPlugin::getInstance()->getSettings()->requireOwner;
35
    }
36
37
    /**
38
     * @return bool
39
     */
40
    public function getIsPublicRegistrationEnabled()
41
    {
42
        return OrganizationPlugin::getInstance()->getSettings()->publicRegistration;
43
    }
44
}
45