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

EccubeWebProcessor   A

Complexity

Total Complexity 13

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 86.67%

Importance

Changes 0
Metric Value
wmc 13
lcom 1
cbo 1
dl 0
loc 43
ccs 13
cts 15
cp 0.8667
rs 10
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getRequestUri() 0 4 2
A getClientIp() 0 4 2
A getReferer() 0 4 2
A getMethod() 0 4 2
A getHost() 0 4 2
A getUserAgent() 0 4 2
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
namespace Eccube\Monolog\Processor;
25
26
use Monolog\Processor\WebProcessor;
27
28
/**
29
 * WebProcessor拡張クラス
30
 *
31
 * @package Eccube\Monolog\Processor
32
 */
33
class EccubeWebProcessor extends WebProcessor
34
{
35
36
    /**
37
     * @param array|\ArrayAccess $serverData Array or object w/ ArrayAccess that provides access to the $_SERVER data
0 ignored issues
show
introduced by
Expected 2 spaces after parameter name; 1 found
Loading history...
38
     * @param array|null $extraFields Extra field names to be added (all available by default)
0 ignored issues
show
introduced by
Expected 9 spaces after parameter type; 1 found
Loading history...
39
     */
40 1061
    public function __construct($serverData = null, array $extraFields = null)
41
    {
42 1061
        parent::__construct($serverData, $extraFields);
43 1061
    }
44
45 1062
    public function getRequestUri()
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
46
    {
47 1062
        return isset($this->serverData['REQUEST_URI']) ? $this->serverData['REQUEST_URI'] : null;
48
    }
49
50 1062
    public function getClientIp()
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
51
    {
52 1062
        return isset($this->serverData['REMOTE_ADDR']) ? $this->serverData['REMOTE_ADDR'] : null;
53
    }
54
55 1062
    public function getReferer()
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
56
    {
57 1062
        return isset($this->serverData['HTTP_REFERER']) ? $this->serverData['HTTP_REFERER'] : null;
58
    }
59
60 1062
    public function getMethod()
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
61
    {
62 1062
        return isset($this->serverData['REQUEST_METHOD']) ? $this->serverData['REQUEST_METHOD'] : null;
63
    }
64
65
    public function getHost()
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
66
    {
67
        return isset($this->serverData['SERVER_NAME']) ? $this->serverData['SERVER_NAME'] : null;
68
    }
69
70 1062
    public function getUserAgent()
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
71
    {
72 1062
        return isset($this->serverData['HTTP_USER_AGENT']) ? $this->serverData['HTTP_USER_AGENT'] : null;
73
    }
74
75
}