Settings::getAll()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
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