public static function keyNotExists($value, $key, $message = null, $propertyPath = null)
{
static::isArray($value, $message, $propertyPath);
if (array_key_exists($key, $value)) {
$message = sprintf($message ?: 'Array contains an element with key "%s"', self::stringify($key));
throw static::createException($value, $message, static::INVALID_KEY_NOT_EXISTS, $propertyPath, array('key' => $key));
}
return true;
}