Completed
Push — master ( c9b1f2...7edc4b )
by Gino
02:53 queued 01:13
created

Settings   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 29
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A postTypesEnabled() 0 4 1
A postCategoriesCoverImageEnabled() 0 4 1
A postCategoriesFeaturedImagesEnabled() 0 4 1
1
<?php
2
3
namespace GinoPane\BlogTaxonomy\Models;
4
5
use Model;
6
use System\Behaviors\SettingsModel;
7
8
/**
9
 * Class Settings
10
 *
11
 * @package GinoPane\BlogTaxonomy\Models
12
 */
13
class Settings extends Model
14
{
15
    const SETTINGS_CODE = 'ginopane_blogtaxonomy';
16
17
    const POST_TYPES_ENABLED_KEY = 'post_types_enabled';
18
    const POST_CATEGORIES_COVER_IMAGES_ENABLED_KEY = 'post_categories_cover_image_enabled';
19
    const POST_CATEGORIES_FEATURED_IMAGES_ENABLED_KEY = 'post_categories_featured_images_enabled';
20
21
    public $implement = [SettingsModel::class];
22
23
    public $settingsCode = self::SETTINGS_CODE;
24
25
    public $settingsFields = 'fields.yaml';
26
27
    public function postTypesEnabled() : bool
0 ignored issues
show
Coding Style introduced by
function postTypesEnabled() does not seem to conform to the naming convention (^(?:is|has|should|may|supports)).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
28
    {
29
        return (bool) $this->{self::POST_TYPES_ENABLED_KEY};
30
    }
31
32
    public function postCategoriesCoverImageEnabled() : bool
0 ignored issues
show
Coding Style introduced by
function postCategoriesCoverImageEnabled() does not seem to conform to the naming convention (^(?:is|has|should|may|supports)).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
33
    {
34
        return (bool) $this->{self::POST_CATEGORIES_COVER_IMAGES_ENABLED_KEY};
35
    }
36
37
    public function postCategoriesFeaturedImagesEnabled() : bool
0 ignored issues
show
Coding Style introduced by
function postCategoriesFeaturedImagesEnabled() does not seem to conform to the naming convention (^(?:is|has|should|may|supports)).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
38
    {
39
        return (bool) $this->{self::POST_CATEGORIES_FEATURED_IMAGES_ENABLED_KEY};
40
    }
41
}
42