/**
 * Build the format of the request
 *
 * @param   SiteRouter  &$router  Router object
 * @param   Uri         &$uri     URI object to process
 *
 * @return  void
 *
 * @since   4.0.0
 */
public function buildFormat(&$router, &$uri)
{
    $route = $uri->getPath();
    // Identify format
    if (!(substr($route, -9) === 'index.php' || substr($route, -1) === '/') && ($format = $uri->getVar('format', 'html'))) {
        $route .= '.' . $format;
        $uri->setPath($route);
        $uri->delVar('format');
    }
}