OrtcRequest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 65
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

7 Methods

Rating   Name   Duplication   Size   Complexity  
getUrlPath() 0 1 ?
isPost() 0 1 ?
getPostData() 0 1 ?
getResponseHandler() 0 1 ?
A getOrtcConfig() 0 4 1
A setOrtcConfig() 0 6 1
A isUrlAbsolute() 0 4 1
1
<?php
2
3
namespace ninjacto\OrtcPhp\Models\Requests;
4
5
use ninjacto\OrtcPhp\Configs\OrtcConfig;
6
use ninjacto\OrtcPhp\Handlers\OrtcResponseHandler;
7
8
abstract class OrtcRequest
9
{
10
    /**
11
     * @var OrtcConfig
12
     */
13
    private $ortcConfig;
14
15
    /**
16
     * get url path (not base url).
17
     *
18
     * @return string
19
     */
20
    abstract public function getUrlPath();
21
22
    /**
23
     * is post request or get request?
24
     *
25
     * @return bool
26
     */
27
    abstract public function isPost();
28
29
    /**
30
     * get post body.
31
     *
32
     * @return array
33
     */
34
    abstract public function getPostData();
35
36
    /**
37
     * get response handler.
38
     *
39
     * @return OrtcResponseHandler
40
     */
41
    abstract public function getResponseHandler();
42
43
    /**
44
     * @return OrtcConfig
45
     */
46 6
    public function getOrtcConfig()
47
    {
48 6
        return $this->ortcConfig;
49
    }
50
51
    /**
52
     * @param OrtcConfig $ortcConfig
53
     *
54
     * @return $this
55
     */
56 6
    public function setOrtcConfig($ortcConfig)
57
    {
58 6
        $this->ortcConfig = $ortcConfig;
59
60 6
        return $this;
61
    }
62
63
    /**
64
     * is absolute url?
65
     *
66
     * @return bool
67
     */
68 3
    public function isUrlAbsolute()
69
    {
70 3
        return false;
71
    }
72
}
73