Completed
Pull Request — master (#114)
by Bart
09:33 queued 07:46
created

Schematic::warning()   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
        'sites' => Services\Sites::class,
22
        'volumes' => Services\Volumes::class,
23
        'assetTransforms' => Services\assetTransforms::class,
24
        'fields' => Services\Fields::class,
25
        'plugins' => Services\Plugins::class,
26
        'sections' => Services\Sections::class,
27
        'globalSets' => Services\GlobalSets::class,
28
        'userGroups' => Services\UserGroups::class,
29
        'users' => Services\Users::class,
30
        'categoryGroups' => Services\CategoryGroups::class,
31
        'tagGroups' => Services\TagGroups::class,
32
        'elementIndexSettings' => Services\ElementIndexSettings::class,
33
    ];
34
35
    /**
36
     * Is force enabled?
37
     * @var boolean
38
     */
39
    public static $force = false;
40
41
    /**
42
     * Logs an error message
43
     *
44
     * @param  string|array $message the message to be logged. This can be a simple string or a more
45
     *                               complex data structure, such as array.
46
     */
47
    public static function error($message)
48
    {
49
        Craft::error($message, 'schematic');
50
    }
51
52
    /**
53
     * Logs a warning message
54
     *
55
     * @param  string|array $message the message to be logged. This can be a simple string or a more
56
     *                               complex data structure, such as array.
57
     */
58
    public static function warning($message)
59
    {
60
        Craft::warning($message, 'schematic');
61
    }
62
63
    /**
64
     * Logs an info message
65
     *
66
     * @param  string|array $message the message to be logged. This can be a simple string or a more
67
     *                               complex data structure, such as array.
68
     */
69
    public static function info($message)
70
    {
71
        Craft::info($message, 'schematic');
72
    }
73
}
74