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

ApiSettings::isEnabled()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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