| Total Complexity | 3 | 
| Total Lines | 51 | 
| Duplicated Lines | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php namespace CalDAVClient\Facade\Responses; | ||
| 19 | abstract class HttpResponse | ||
| 20 | { | ||
| 21 | const HttpOKStatus = 'HTTP/1.1 200 OK'; | ||
| 22 | const HttpNotFoundStatus = 'HTTP/1.1 404 Not Found'; | ||
| 23 | const HttpForbiddenStatus = 'HTTP/1.1 403 Forbidden'; | ||
| 24 | |||
| 25 | const HttpCodeCreated = 201; | ||
| 26 | const HttpCodeNoContent = 204; | ||
| 27 | const HttpCodeOk = 200; | ||
| 28 | const HttpCodeMultiResponse = 207; | ||
| 29 | /** | ||
| 30 | * @var string | ||
| 31 | */ | ||
| 32 | protected $body; | ||
| 33 | |||
| 34 | /** | ||
| 35 | * @var int | ||
| 36 | */ | ||
| 37 | protected $code; | ||
| 38 | |||
| 39 | /** | ||
| 40 | * HttpResponse constructor. | ||
| 41 | * @param string $body | ||
| 42 | * @param int $code | ||
| 43 | */ | ||
| 44 | public function __construct($body, $code) | ||
| 45 |     { | ||
| 46 | $this->body = $body; | ||
| 47 | $this->code = $code; | ||
| 48 | } | ||
| 49 | |||
| 50 | /** | ||
| 51 | * @return string | ||
| 52 | */ | ||
| 53 | public function getBody() | ||
| 56 | } | ||
| 57 | |||
| 58 | /** | ||
| 59 | * @return int | ||
| 60 | */ | ||
| 61 | public function getCode() | ||
| 64 | } | ||
| 65 | |||
| 66 | /** | ||
| 67 | * @return bool | ||
| 68 | */ | ||
| 69 | abstract public function isSuccessFull(); | ||
| 70 | } |