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

WebProcessor::getRequestUri()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 2

Importance

Changes 0
Metric Value
cc 2
eloc 2
nc 2
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 2
cts 2
cp 1
crap 2
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
namespace Eccube\Log\Monolog\Processor;
26
27
use Monolog\Processor\WebProcessor as BaseWebProcessor;
28
29
/**
30
 * WebProcessor拡張クラス
31
 */
32
class WebProcessor extends BaseWebProcessor
33
{
34
35
    /**
36
     * @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...
37
     * @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...
38
     */
39 1062
    public function __construct($serverData = null, array $extraFields = null)
40
    {
41 1062
        parent::__construct($serverData, $extraFields);
42 1062
    }
43
44 1062
    public function getRequestUri()
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
45
    {
46 1062
        return isset($this->serverData['REQUEST_URI']) ? $this->serverData['REQUEST_URI'] : null;
47
    }
48
49 1062
    public function getClientIp()
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
50
    {
51 1062
        return isset($this->serverData['REMOTE_ADDR']) ? $this->serverData['REMOTE_ADDR'] : null;
52
    }
53
54 1062
    public function getReferer()
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
55
    {
56 1062
        return isset($this->serverData['HTTP_REFERER']) ? $this->serverData['HTTP_REFERER'] : null;
57
    }
58
59 1062
    public function getMethod()
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
60
    {
61 1062
        return isset($this->serverData['REQUEST_METHOD']) ? $this->serverData['REQUEST_METHOD'] : null;
62
    }
63
64
    public function getHost()
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
65
    {
66
        return isset($this->serverData['SERVER_NAME']) ? $this->serverData['SERVER_NAME'] : null;
67
    }
68
69 1062
    public function getUserAgent()
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
70
    {
71 1062
        return isset($this->serverData['HTTP_USER_AGENT']) ? $this->serverData['HTTP_USER_AGENT'] : null;
72
    }
73
74
}