QueryString::format()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * This file is part of the Apix Project.
5
 *
6
 * (c) Franck Cassedanne <franck at ouarz.net>
7
 *
8
 * @license http://opensource.org/licenses/BSD-3-Clause  New BSD License
9
 */
10
11
namespace Apix\Log\LogFormatter;
12
13
use Apix\Log\LogFormatter;
14
use Apix\Log\LogEntry;
15
16
/**
17
 * Query string log formatter for Apix log.
18
 *
19
 * @author Franck Cassedanne <franck at ouarz.net>
20
 */
21
class QueryString extends LogFormatter
22
{
23
    /**
24
     * Formats the given log entry.
25
     *
26
     * @param LogEntry $log The log entry to format
27
     *
28
     * @return string
29
     */
30 16
    public function format(LogEntry $log)
31
    {
32 16
        return http_build_query($log->context);
33
    }
34
}
35