Completed
Push — master ( 9448cf...a1463b )
by Scott
02:09
created

ApiSettings   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 28
c 1
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A isEnabled() 0 4 1
1
<?php namespace Bedard\Shop\Models;
2
3
use Model;
4
5
/**
6
 * Api Settings Model.
7
 */
8
class ApiSettings extends Model
9
{
10
11
    /**
12
     * @var array   Behaviors
13
     */
14
    public $implement = ['System.Behaviors.SettingsModel'];
15
16
    /**
17
     * @var string  Settings code
18
     */
19
    public $settingsCode = 'bedard_shop_settings_api';
20
21
    /**
22
     * @var string  Settings fields
23
     */
24
    public $settingsFields = 'fields.yaml';
25
26
    /**
27
     * Determines if the HTTP API is enabled.
28
     *
29
     * @return boolean
30
     */
31
    public static function isEnabled()
32
    {
33
        return self::get('is_enabled', false);
34
    }
35
}
36