public static function keyExists($value, $key, $message = null, $propertyPath = null)
{
static::isArray($value, $message, $propertyPath);
if (!array_key_exists($key, $value)) {
$message = sprintf($message ?: 'Array does not contain an element with key "%s"', static::stringify($key));
throw static::createException($value, $message, static::INVALID_KEY_EXISTS, $propertyPath, array('key' => $key));
}
return true;
}