private function checkType(&$type)
{
if (!is_string($type)) {
throw new InvalidTwitterCardException('The Twitter card type must be a string value, [' . gettype($type) . '] was given.');
}
$type = strtolower(trim($type));
if (!in_array($type, $this->types())) {
throw new InvalidTwitterCardException("The Twitter card type [{$type}] is not supported.");
}
}