Request   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 6
Bugs 0 Features 1
Metric Value
wmc 4
c 6
b 0
f 1
lcom 0
cbo 1
dl 0
loc 49
ccs 8
cts 8
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getMethod() 0 4 1
A getUri() 0 4 1
A jsonSerialize() 0 4 1
A getData() 0 4 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