for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Pulsar;
use ArrayAccess;
class Error implements ArrayAccess
{
/** @var string */
private $error;
private $message;
/** @var array */
private $context;
public function __construct(string $error, array $context, string $message)
$this->error = $error;
$this->context = $context;
$this->message = $message;
}
public function __toString()
return $this->message;
public function getError(): string
return $this->error;
public function getContext(): array
return $this->context;
public function getMessage(): string
public function offsetExists($offset)
return property_exists($this, $offset);
public function offsetGet($offset)
return $this->$offset;
public function offsetSet($offset, $value)
throw new \InvalidArgumentException('Modifying a validation error is not supported');
public function offsetUnset($offset)