Piwik\Plugins\SitesManager\API::checkAndReturnType PHP Method

checkAndReturnType() private method

private checkAndReturnType ( $type )
    private function checkAndReturnType($type)
    {
        if (empty($type)) {
            $type = Site::DEFAULT_SITE_TYPE;
        }
        if (!is_string($type)) {
            throw new Exception("Invalid website type {$type}");
        }
        return $type;
    }