| Total Complexity | 5 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class Response |
||
| 8 | { |
||
| 9 | private const STATUS_OK = 'OK'; |
||
| 10 | |||
| 11 | /** @var int */ |
||
| 12 | protected $id; |
||
| 13 | |||
| 14 | /** @var string */ |
||
| 15 | protected $type; |
||
| 16 | |||
| 17 | /** @var bool */ |
||
| 18 | protected $isOk; |
||
| 19 | |||
| 20 | /** @var ResponseRequest[] */ |
||
| 21 | protected $responseRequests = []; |
||
| 22 | |||
| 23 | public function __construct(int $id, string $type) |
||
| 24 | { |
||
| 25 | $this->id = $id; |
||
| 26 | $this->isOk = $type === self::STATUS_OK; |
||
| 27 | $this->type = $type; |
||
| 28 | } |
||
| 29 | |||
| 30 | public function getId() : int |
||
| 31 | { |
||
| 32 | return $this->id; |
||
| 33 | } |
||
| 34 | |||
| 35 | public function getType() : string |
||
| 36 | { |
||
| 37 | return $this->type; |
||
| 38 | } |
||
| 39 | |||
| 40 | public function addResponseRequest(ResponseRequest $responseRequest) : void |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return ResponseRequest[] |
||
| 47 | */ |
||
| 48 | public function getResponseRequests() : array |
||
| 51 | } |
||
| 52 | } |
||
| 53 |