diff --git a/src/Response/BaseResponse.php b/src/Response/BaseResponse.php index 3730897..ca4963b 100644 --- a/src/Response/BaseResponse.php +++ b/src/Response/BaseResponse.php @@ -108,6 +108,8 @@ protected function parseParameter( } /** + * Is this an error. + * * @return bool */ public function isError(): bool @@ -115,6 +117,11 @@ public function isError(): bool return $this->error; } + /** + * Return the response as an Array. + * + * @return array + */ public function asArray(): array { // Get the variables of the current class @@ -124,7 +131,7 @@ public function asArray(): array $result = []; // Traverse the class properties - foreach ($classProperties as $classProperty) { + foreach ($classProperties as $classProperty => $value) { if ($classProperty !== 'casts') { // Add them to the result $result[$classProperty] = $this->$classProperty;