Request::getTitle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * @author @fabfuel <[email protected]>
4
 * @created 19.11.14, 07:03 
5
 */
6
namespace Fabfuel\Prophiler\DataCollector;
7
8
use Fabfuel\Prophiler\DataCollectorInterface;
9
10
class Request implements DataCollectorInterface
11
{
12
    /**
13
     * Get the title of this data collector
14
     *
15
     * @return string
16
     */
17 1
    public function getTitle()
18
    {
19 1
        return 'Request';
20
    }
21
22
    /**
23
     * Get the icon HTML markup
24
     *
25
     * For example font-awesome icons: <i class="fa fa-pie-chart"></i>
26
     * See: http://fortawesome.github.io/Font-Awesome/icons/
27
     *
28
     * @return string
29
     */
30 1
    public function getIcon()
31
    {
32 1
        return '<i class="fa fa-arrow-circle-o-down"></i>';
33
    }
34
35
    /**
36
     * Get data from the data collector
37
     *
38
     * @return array
39
     */
40 1
    public function getData()
41
    {
42
        $data = [
43 1
            'SERVER' => $_SERVER,
44 1
            'GET' => $_GET,
45 1
            'POST' => $_POST,
46 1
            'COOKIE' => $_COOKIE,
47 1
            'FILES' => $_FILES,
48 1
        ];
49
50 1
        if (isset($_SESSION)) {
51 1
            $data['SESSION'] = $_SESSION;
52 1
        }
53
54 1
        return $data;
55
    }
56
}
57