Completed
Pull Request — master (#114)
by Bart
06:18
created

Schematic   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A error() 0 4 1
A warning() 0 4 1
A info() 0 4 1
1
<?php
2
3
namespace NerdsAndCompany\Schematic;
4
5
use Craft;
6
7
/**
8
 * Schematic.
9
 *
10
 * Sync Craft Setups.
11
 *
12
 * @author    Nerds & Company
13
 * @copyright Copyright (c) 2015-2018, Nerds & Company
14
 * @license   MIT
15
 *
16
 * @see      http://www.nerds.company
17
 */
18
class Schematic
19
{
20
    const DATA_TYPES = [
21
        'volumes' => Services\Volumes::class,
22
        'assetTransforms' => Services\assetTransforms::class,
23
        'fields' => Services\Fields::class,
24
        'plugins' => Services\Plugins::class,
25
        'sections' => Services\Sections::class,
26
        'globalSets' => Services\GlobalSets::class,
27
        'userGroups' => Services\UserGroups::class,
28
        'users' => Services\Users::class,
29
        'categoryGroups' => Services\CategoryGroups::class,
30
        'tagGroups' => Services\TagGroups::class,
31
        'elementIndexSettings' => Services\ElementIndexSettings::class,
32
    ];
33
34
    /**
35
     * Logs an error message
36
     *
37
     * @param  string|array $message the message to be logged. This can be a simple string or a more
38
     *                               complex data structure, such as array.
39
     */
40
    public static function error($message)
41
    {
42
        Craft::error($message, 'schematic');
43
    }
44
45
    /**
46
     * Logs a warning message
47
     *
48
     * @param  string|array $message the message to be logged. This can be a simple string or a more
49
     *                               complex data structure, such as array.
50
     */
51
    public static function warning($message)
52
    {
53
        Craft::warning($message, 'schematic');
54
    }
55
56
    /**
57
     * Logs an info message
58
     *
59
     * @param  string|array $message the message to be logged. This can be a simple string or a more
60
     *                               complex data structure, such as array.
61
     */
62
    public static function info($message)
63
    {
64
        Craft::info($message, 'schematic');
65
    }
66
}
67