/**
* Set the property
*
* @param string $key
* @param int $value
*
* @throws \InvalidArgumentException
*/
public static function set($key, $value)
{
if (!in_array($key, static::getAllowedKeys(), true)) {
throw new \InvalidArgumentException(sprintf('The key "%s" is not allowed', $key));
}
$data = static::getData();
$data[$key] = (int) $value;
Config::set(static::$configKey, serialize($data));
Config::persist(static::$configKey, serialize($data));
}