for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Oqq\Minc\Common\Collection\Exception;
use Oqq\Minc\Common\Exception\OutOfBoundsException;
/**
* @author Eric Braun <[email protected]>
*/
class KeyIsNotDefinedException extends OutOfBoundsException
{
/** @var mixed */
protected $key;
* @param mixed $key
public function __construct($key)
$this->key = $key;
parent::__construct(sprintf(
'Key with value %s is not defined',
$this->getKeyAsString()
));
}
* @return mixed
public function getKey()
return $this->key;
* @return string
protected function getKeyAsString()
return is_string($this->key) ? '"'.$this->key.'"' : var_export($this->key, true);