| Total Complexity | 10 |
| Total Lines | 83 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php // Copyright ⓒ 2018 Magneds IP B.V. - All Rights Reserved |
||
| 6 | class ResponseInfo |
||
| 7 | { |
||
| 8 | /** |
||
| 9 | * @var string |
||
| 10 | */ |
||
| 11 | protected $status; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @var int |
||
| 15 | */ |
||
| 16 | protected $code; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | protected $message; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var mixed |
||
| 25 | */ |
||
| 26 | protected $actionData; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * ResponseInfo constructor. |
||
| 30 | * @param string $status |
||
| 31 | * @param int $code |
||
| 32 | * @param string $message |
||
| 33 | */ |
||
| 34 | public function __construct(string $status, int $code, string $message) |
||
| 35 | { |
||
| 36 | $this->status = $status; |
||
| 37 | $this->code = $code; |
||
| 38 | $this->message = $message; |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @return string |
||
| 43 | */ |
||
| 44 | public function getStatus(): string |
||
| 45 | { |
||
| 46 | return $this->status; |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @return int |
||
| 51 | */ |
||
| 52 | public function getCode(): int |
||
| 53 | { |
||
| 54 | return $this->code; |
||
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @return string |
||
| 59 | */ |
||
| 60 | public function getMessage(): string |
||
| 63 | } |
||
| 64 | |||
| 65 | public function setActionData($actionData) |
||
| 66 | { |
||
| 67 | $this->actionData = $actionData; |
||
| 68 | return $this; |
||
| 69 | } |
||
| 70 | |||
| 71 | public function getActionData() |
||
| 74 | } |
||
| 75 | |||
| 76 | /** |
||
| 77 | * Build this object with data array typically from the responses json. |
||
| 78 | * |
||
| 79 | * @param array $array |
||
| 80 | * @return self |
||
| 81 | */ |
||
| 82 | public static function buildFromArray($array) |
||
| 89 | } |
||
| 90 | } |
||
| 91 |