for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Ackintosh\Snidel;
class Error implements \ArrayAccess
{
/** #var array */
private $errors = array();
/**
* @param mixed $offset
* @return bool
*/
public function offsetExists($offset)
if (isset($this->errors[$offset]) && $this->errors[$offset] !== '') {
return true;
}
return false;
* @return mixed
public function offsetGet($offset)
if (!$this->offsetExists($offset)) {
return null;
return $this->errors[$offset];
* @return void
public function offsetSet($offset, $value)
$this->errors[$offset] = $value;
public function offsetUnset($offset)
unset($this->errors[$offset]);
public function exists()
return count($this->errors) > 0;