Request   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 47
ccs 15
cts 15
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getTitle() 0 4 1
A getData() 0 16 2
A getIcon() 0 4 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