Request::getData()   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 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
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
namespace Marek\Toggable\API\Http\Request;
4
5
use Marek\Toggable\API\Toggl\Values\ValueObject;
6
use RuntimeException;
7
8
/**
9
 * Class Request
10
 * @package Marek\Toggable\API\Http\Request
11
 *
12
 * @property-read string $method
13
 * @property-read string $uri
14
 * @property-read array $data
15
 */
16
class Request extends ValueObject implements RequestInterface
17
{
18
    /**
19
     * @var string
20
     */
21
    protected $method = Request::GET;
22
23
    /**
24
     * @var string
25
     */
26
    protected $uri;
27
28
    /**
29
     * @var array
30
     */
31
    protected $data;
32
33
    /**
34
     * @inheritDoc
35
     */
36 55
    public function getMethod()
37
    {
38 55
        return $this->method;
39
    }
40
41
    /**
42
     * @inheritDoc
43
     */
44 54
    public function getUri()
45
    {
46 54
        return $this->uri;
47
    }
48
49
    /**
50
     * @inheritDoc
51
     */
52 33
    public function jsonSerialize()
53
    {
54 33
        throw new RuntimeException('Not implemented');
55
    }
56
57
    /**
58
     * @inheritDoc
59
     */
60 55
    public function getData()
61
    {
62 55
        return $this->data;
63
    }
64
}
65