Completed
Push — master ( e3b8a9...e92bf7 )
by huang
05:36
created

AccessHandler::logContextFormat()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
ccs 6
cts 6
cp 1
crap 1
1
<?php
2
/**
3
 * @author    jan huang <[email protected]>
4
 * @copyright 2016
5
 *
6
 * @see      https://www.github.com/janhuang
7
 * @see      http://www.fast-d.cn/
8
 */
9
10
namespace FastD\Logger;
11
12
/**
13
 * Class AccessHandler.
14
 */
15
class AccessHandler extends HandlerAbstract
16
{
17
    /**
18
     * @return array
19
     */
20 2
    protected function logContextFormat()
21
    {
22
        return [
23 2
            'ip' => get_local_ip(),
24 2
            'status' => response()->getStatusCode(),
25 2
            'get' => request()->getQueryParams(),
26 2
            'post' => request()->getParsedBody(),
27 2
        ];
28
    }
29
}
30