for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Speicher210\Fastbill\Api;
use JMS\Serializer\Annotation as JMS;
/**
* Abstract service response.
*/
class AbstractResponse implements ResponseInterface
{
* Array of errors.
*
* @var array
* @JMS\SerializedName("ERRORS")
* @JMS\Type("array<string, string>")
protected $errors = array();
* The status of the entity created / updated.
* @var string
* @JMS\SerializedName("STATUS")
* @JMS\Type("string")
protected $status;
* {@inheritdoc}
public function getErrors()
return $this->errors;
}
public function hasErrors()
return count($this->errors) !== 0;
public function getStatus()
return $this->status;
public function setStatus($status)
$this->status = $status;
public function isStatusSuccess()
return $this->getStatus() === self::STATUS_SUCCESS;
public function isStatusValid()
return $this->getStatus() === self::STATUS_VALID;
public function isStatusInvalid()
return $this->getStatus() === self::STATUS_INVALID;