| Total Complexity | 7 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 5 | class StatusCode implements Contracts\StatusCode |
||
| 6 | { |
||
| 7 | protected $message; |
||
| 8 | protected $code; |
||
| 9 | protected $description; |
||
| 10 | protected $rfcNumber; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * StatusCode constructor. |
||
| 14 | */ |
||
| 15 | 6 | public function __construct($data) |
|
| 16 | { |
||
| 17 | 6 | $this->message = $data['message']; |
|
| 18 | 6 | $this->code = $data['code']; |
|
| 19 | 6 | $this->description = $data['description'] ? $data['description'] : ''; |
|
| 20 | 6 | $this->rfcNumber = $data['rfc'] ? $data['rfc'] : 0; |
|
| 21 | } |
||
| 22 | |||
| 23 | 4 | public function getMessage(): string |
|
| 26 | } |
||
| 27 | |||
| 28 | 1 | public function getCode(): int |
|
| 29 | { |
||
| 30 | 1 | return $this->code; |
|
| 31 | } |
||
| 32 | |||
| 33 | 1 | public function getDescription(): string |
|
| 34 | { |
||
| 35 | 1 | return $this->description; |
|
| 36 | } |
||
| 37 | |||
| 38 | 1 | public function getRFCNumber(): int |
|
| 41 | } |
||
| 42 | } |
||
| 43 |