Response   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
eloc 7
c 2
b 0
f 0
dl 0
loc 37
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getCode() 0 3 1
A getMessage() 0 3 1
1
<?php
2
3
namespace Orkhanahmadov\Goldenpay\Response;
4
5
abstract class Response
6
{
7
    /**
8
     * @var int|null
9
     */
10
    protected $code = null;
11
    /**
12
     * @var string|null
13
     */
14
    protected $message = null;
15
16
    /**
17
     * Response constructor.
18
     *
19
     * @param int|null    $code
20
     * @param string|null $message
21
     */
22
    public function __construct(?int $code, ?string $message)
23
    {
24
        $this->code = $code;
25
        $this->message = $message;
26
    }
27
28
    /**
29
     * @return int|null
30
     */
31
    public function getCode(): ?int
32
    {
33
        return $this->code;
34
    }
35
36
    /**
37
     * @return string|null
38
     */
39
    public function getMessage(): ?string
40
    {
41
        return $this->message;
42
    }
43
}
44