public function deserialize($serializedValue)
{
if (null === $serializedValue && $this->isNullable()) {
return $this->default === null ? null : $this->default;
}
if (is_int($serializedValue)) {
return $serializedValue;
}
if (is_string($serializedValue)) {
return (int) $serializedValue;
}
throw InvalidArgumentException::expected('string', $serializedValue);
}