| 1 | <?php |
||
| 5 | class Response |
||
| 6 | { |
||
| 7 | const CODE_OK = 0; |
||
| 8 | const CODE_WRONG_PARAMETERS = 1; |
||
| 9 | const CODE_INTERNAL_ERROR = 2; |
||
| 10 | const CODE_NO_SUCH_FUNCTION = 3; |
||
| 11 | const CODE_NO_OR_WRONG_API_KEY = 4; |
||
| 12 | |||
| 13 | private $response = array(); |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @param \Guzzle\Http\Message\Response $response |
||
| 17 | */ |
||
| 18 | 4 | public function __construct(\Guzzle\Http\Message\Response $response) |
|
| 32 | |||
| 33 | /** |
||
| 34 | * @return string|null |
||
| 35 | */ |
||
| 36 | 4 | public function getCode() |
|
| 40 | |||
| 41 | /** |
||
| 42 | * @return string|null |
||
| 43 | */ |
||
| 44 | 4 | public function getMessage() |
|
| 48 | |||
| 49 | /** |
||
| 50 | * @return string|null |
||
| 51 | */ |
||
| 52 | 4 | public function getData() |
|
| 56 | |||
| 57 | /** |
||
| 58 | * Returns the entire response from Etherpad Lite API |
||
| 59 | * |
||
| 60 | * @return array |
||
| 61 | */ |
||
| 62 | 4 | public function getResponse() |
|
| 66 | } |
||
| 67 |
This check looks for the
elsebranches ofifstatements that have no statements or where all statements have been commented out. This may be the result of changes for debugging or the code may simply be obsolete.These
elsebranches can be removed.could be turned into
This is much more concise to read.