| Total Complexity | 9 | 
| Total Lines | 81 | 
| Duplicated Lines | 0 % | 
| Coverage | 30.76% | 
| Changes | 2 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 10 | class AbstractResponse implements ResponseInterface | ||
| 11 | { | ||
| 12 | /** @var mixed[] */ | ||
| 13 | private $contents; | ||
| 14 | |||
| 15 | /** @var string */ | ||
| 16 | private $error; | ||
| 17 | |||
| 18 | /** | ||
| 19 | * @param TelnetResponseInterface $telnetResponse | ||
| 20 | */ | ||
| 21 | 2 | public function __construct(TelnetResponseInterface $telnetResponse) | |
| 44 | } | ||
| 45 | |||
| 46 | /** | ||
| 47 | * @param string $error | ||
| 48 | */ | ||
| 49 | 2 | private function setError($error) | |
| 50 |     { | ||
| 51 | 2 | $this->error = $error; | |
| 52 | 2 | } | |
| 53 | |||
| 54 | /** | ||
| 55 | * Whether an error was returned. | ||
| 56 | * | ||
| 57 | * @return bool | ||
| 58 | */ | ||
| 59 | public function hasError() | ||
| 60 |     { | ||
| 61 | return (bool)$this->error; | ||
| 62 | } | ||
| 63 | |||
| 64 | /** | ||
| 65 | * Get the error message. | ||
| 66 | * | ||
| 67 | * @return string | ||
| 68 | */ | ||
| 69 | public function getError() | ||
| 70 |     { | ||
| 71 | return $this->error; | ||
| 72 | } | ||
| 73 | |||
| 74 | /** | ||
| 75 | * Extract specific information from the raw contents array for easier access. | ||
| 76 | * | ||
| 77 | * @param mixed[] $contents | ||
| 78 | */ | ||
| 79 | protected function parseContents(array $contents) | ||
| 81 | } | ||
| 82 | |||
| 83 | /** | ||
| 84 | * Get the raw response as an array. | ||
| 85 | * | ||
| 86 | * @return mixed[] | ||
| 87 | */ | ||
| 88 | public function getContents() | ||
| 93 | 
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.