Context::getProcess()   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
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 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