Arcanedev\SeoHelper\Entities\Twitter\Card::checkType PHP Method

checkType() private method

Check the card type.
private checkType ( string &$type )
$type string
    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.");
        }
    }