Arcanedev\SeoHelper\Entities\Title::checkTitle PHP Method

checkTitle() private method

Check title.
private checkTitle ( string &$title )
$title string
    private function checkTitle(&$title)
    {
        if (!is_string($title)) {
            $type = gettype($title);
            throw new InvalidArgumentException("The title must be a string value, [{$type}] is given.");
        }
        $title = trim($title);
        if (empty($title)) {
            throw new InvalidArgumentException('The title is required and must not be empty.');
        }
    }