Failed Conditions
Pull Request — master (#1873)
by Tsuyoshi
273:59 queued 266:59
created

log.php ➔ log_debug()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 4
nc 2
nop 1
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of EC-CUBE
5
 *
6
 * Copyright(c) 2000-2015 LOCKON CO.,LTD. All Rights Reserved.
7
 *
8
 * http://www.lockon.co.jp/
9
 *
10
 * This program is free software; you can redistribute it and/or
11
 * modify it under the terms of the GNU General Public License
12
 * as published by the Free Software Foundation; either version 2
13
 * of the License, or (at your option) any later version.
14
 *
15
 * This program is distributed in the hope that it will be useful,
16
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 * GNU General Public License for more details.
19
 *
20
 * You should have received a copy of the GNU General Public License
21
 * along with this program; if not, write to the Free Software
22
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23
 */
24
25
if (!function_exists('log_emergency')) {
26
    function log_emergency($message)
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
27
    {
28
        $app = \Eccube\Application::getInstance();
29
        if (isset($app['eccube.log'])) {
30
            $app['eccube.log']->emergency($message);
31
        }
32
    }
33
}
34
35
if (!function_exists('log_alert')) {
36
    function log_alert($message)
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
37
    {
38
        $app = \Eccube\Application::getInstance();
39
        if (isset($app['eccube.log'])) {
40
            $app['eccube.log']->alert($message);
41
        }
42
    }
43
}
44
45
if (!function_exists('log_critical')) {
46
    function log_critical($message)
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
47
    {
48
        $app = \Eccube\Application::getInstance();
49
        if (isset($app['eccube.log'])) {
50
            $app['eccube.log']->critical($message);
51
        }
52
    }
53
}
54
55 View Code Duplication
if (!function_exists('log_error')) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
56
    function log_error($message)
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
57
    {
58
        $app = \Eccube\Application::getInstance();
59
        if (isset($app['eccube.log'])) {
60
            $app['eccube.log']->error($message);
61
        }
62
    }
63
}
64
65
if (!function_exists('log_warning')) {
66
    function log_warning($message)
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
67
    {
68
        $app = \Eccube\Application::getInstance();
69
        if (isset($app['eccube.log'])) {
70
            $app['eccube.log']->warning($message);
71
        }
72
    }
73
}
74
75
if (!function_exists('log_notice')) {
76
    function log_notice($message)
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
77
    {
78
        $app = \Eccube\Application::getInstance();
79
        if (isset($app['eccube.log'])) {
80
            $app['eccube.log']->notice($message);
81
        }
82
    }
83
}
84
85 View Code Duplication
if (!function_exists('log_info')) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
86
    function log_info($message)
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
87
    {
88
        $app = \Eccube\Application::getInstance();
89
        if (isset($app['eccube.log'])) {
90
            $app['eccube.log']->info($message);
91
        }
92
    }
93
}
94
95
if (!function_exists('log_debug')) {
96
    function log_debug($message)
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
97
    {
98
        $app = \Eccube\Application::getInstance();
99
        if (isset($app['eccube.log'])) {
100
            $app['eccube.log']->debug($message);
101
        }
102
    }
103
}
104