Completed
Pull Request — master (#114)
by Bart
11:49
created

Schematic::error()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 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
     * Is force enabled?
36
     * @var boolean
37
     */
38
    public static $force = false;
39
40
    /**
41
     * Logs an error message
42
     *
43
     * @param  string|array $message the message to be logged. This can be a simple string or a more
44
     *                               complex data structure, such as array.
45
     */
46
    public static function error($message)
47
    {
48
        Craft::error($message, 'schematic');
49
    }
50
51
    /**
52
     * Logs a warning message
53
     *
54
     * @param  string|array $message the message to be logged. This can be a simple string or a more
55
     *                               complex data structure, such as array.
56
     */
57
    public static function warning($message)
58
    {
59
        Craft::warning($message, 'schematic');
60
    }
61
62
    /**
63
     * Logs an info message
64
     *
65
     * @param  string|array $message the message to be logged. This can be a simple string or a more
66
     *                               complex data structure, such as array.
67
     */
68
    public static function info($message)
69
    {
70
        Craft::info($message, 'schematic');
71
    }
72
}
73