Failed Conditions
Pull Request — master (#1861)
by k-yamamura
501:04 queued 494:33
created

EccubeLog::info()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
crap 1
1
<?php
2
/*
3
 * This file is part of EC-CUBE
4
 *
5
 * Copyright(c) 2000-2015 LOCKON CO.,LTD. All Rights Reserved.
6
 *
7
 * http://www.lockon.co.jp/
8
 *
9
 * This program is free software; you can redistribute it and/or
10
 * modify it under the terms of the GNU General Public License
11
 * as published by the Free Software Foundation; either version 2
12
 * of the License, or (at your option) any later version.
13
 *
14
 * This program is distributed in the hope that it will be useful,
15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 * GNU General Public License for more details.
18
 *
19
 * You should have received a copy of the GNU General Public License
20
 * along with this program; if not, write to the Free Software
21
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22
 */
23
24
use Eccube\Monolog\EccubeLogger;
25
26
/**
27
 * EC-CUBE専用ログ出力クラス
28
 * namespaceは設定せず、各プログラムからはクラス名::関数名(\EccubeLog::info())で利用できるようにしている。
29
 * ログ出力時はレベルに応じた関数を使用する。
30
 *
31
 * ログ出力は実際にはEccubeLoggerクラスで行っている。
32
 */
33
class EccubeLog
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
34
{
35
36
    /**
0 ignored issues
show
introduced by
Doc comment for parameter "$message" missing
Loading history...
37
     * emergencyレベル用
38
     *
39
     * @param $message
0 ignored issues
show
introduced by
Missing parameter name
Loading history...
40
     * @param array $context
0 ignored issues
show
introduced by
Expected 3 spaces after parameter type; 1 found
Loading history...
41
     */
42
    public static function emergency($message, array $context = array())
43
    {
44
        $logger = EccubeLogger::getInstance();
45
46
        $logger->emergency($message, $context);
47
    }
48
49
    /**
0 ignored issues
show
introduced by
Doc comment for parameter "$message" missing
Loading history...
50
     * alertレベル用
51
     *
52
     * @param $message
0 ignored issues
show
introduced by
Missing parameter name
Loading history...
53
     * @param array $context
0 ignored issues
show
introduced by
Expected 3 spaces after parameter type; 1 found
Loading history...
54
     */
55
    public static function alert($message, array $context = array())
56
    {
57
        $logger = EccubeLogger::getInstance();
58
59
        $logger->alert($message, $context);
60
    }
61
62
    /**
0 ignored issues
show
introduced by
Doc comment for parameter "$message" missing
Loading history...
63
     * criticalレベル用
64
     *
65
     * @param $message
0 ignored issues
show
introduced by
Missing parameter name
Loading history...
66
     * @param array $context
0 ignored issues
show
introduced by
Expected 3 spaces after parameter type; 1 found
Loading history...
67
     */
68
    public static function critical($message, array $context = array())
69
    {
70
        $logger = EccubeLogger::getInstance();
71
72
        $logger->critical($message, $context);
73
    }
74
75
    /**
0 ignored issues
show
introduced by
Doc comment for parameter "$message" missing
Loading history...
76
     * errorレベル用
77
     *
78
     * @param $message
0 ignored issues
show
introduced by
Missing parameter name
Loading history...
79
     * @param array $context
0 ignored issues
show
introduced by
Expected 3 spaces after parameter type; 1 found
Loading history...
80
     */
81 4
    public static function error($message, array $context = array())
82
    {
83 4
        $logger = EccubeLogger::getInstance();
84
85 4
        $logger->error($message, $context);
86 4
    }
87
88
    /**
0 ignored issues
show
introduced by
Doc comment for parameter "$message" missing
Loading history...
89
     * warningレベル用
90
     *
91
     * @param $message
0 ignored issues
show
introduced by
Missing parameter name
Loading history...
92
     * @param array $context
0 ignored issues
show
introduced by
Expected 3 spaces after parameter type; 1 found
Loading history...
93
     */
94
    public static function warning($message, array $context = array())
95
    {
96
        $logger = EccubeLogger::getInstance();
97
98
        $logger->warning($message, $context);
99
    }
100
101
    /**
0 ignored issues
show
introduced by
Doc comment for parameter "$message" missing
Loading history...
102
     * noticeレベル用
103
     *
104
     * @param $message
0 ignored issues
show
introduced by
Missing parameter name
Loading history...
105
     * @param array $context
0 ignored issues
show
introduced by
Expected 3 spaces after parameter type; 1 found
Loading history...
106
     */
107
    public static function notice($message, array $context = array())
108
    {
109
        $logger = EccubeLogger::getInstance();
110
111
        $logger->notice($message, $context);
112
    }
113
114
    /**
0 ignored issues
show
introduced by
Doc comment for parameter "$message" missing
Loading history...
115
     * infoレベル用
116
     *
117
     * @param $message
0 ignored issues
show
introduced by
Missing parameter name
Loading history...
118
     * @param array $context
0 ignored issues
show
introduced by
Expected 3 spaces after parameter type; 1 found
Loading history...
119
     */
120 463
    public static function info($message, array $context = array())
121
    {
122 463
        $logger = EccubeLogger::getInstance();
123
124 463
        $logger->info($message, $context);
125 463
    }
126
127
    /**
0 ignored issues
show
introduced by
Doc comment for parameter "$message" missing
Loading history...
128
     * debugレベル用
129
     *
130
     * @param $message
0 ignored issues
show
introduced by
Missing parameter name
Loading history...
131
     * @param array $context
0 ignored issues
show
introduced by
Expected 3 spaces after parameter type; 1 found
Loading history...
132
     */
133
    public static function debug($message, array $context = array())
134
    {
135
        $logger = EccubeLogger::getInstance();
136
137
        $logger->debug($message, $context);
138
    }
139
140
}
141