Context   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 3
c 1
b 1
f 0
lcom 1
cbo 1
dl 0
loc 33
ccs 7
cts 7
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A initiate() 0 4 1
A getProcess() 0 4 1
A getRequest() 0 4 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: arnaud
5
 * Date: 01/11/15
6
 * Time: 16:42
7
 */
8
9
namespace Ndrx\Profiler\Context;
10
11
use Ndrx\Profiler\Context\Contracts\ContextInterface;
12
use Ndrx\Profiler\Process;
13
use Symfony\Component\HttpFoundation\Request;
14
15
abstract class Context implements ContextInterface
16
{
17
    /**
18
     * @var Process
19
     */
20
    protected $process;
21
22
    /**
23
     * @var Request
24
     */
25
    protected $request;
26
27 126
    public function initiate()
28
    {
29 126
        $this->request = Request::createFromGlobals();
30 126
    }
31
32
    /**
33
     * @return Process
34
     */
35 124
    public function getProcess()
36
    {
37 124
        return $this->process;
38
    }
39
40
    /**
41
     * @return Request
42
     */
43 10
    public function getRequest()
44
    {
45 10
        return $this->request;
46
    }
47
}
48