public function install(Environment $twig): Environment
    {
        $twig = clone $twig;

        $extension = new Extension($this->pipeline);
        $twig->addExtension($extension);

        $compiler = new PatchingCompiler($twig);
        $twig->setCompiler($compiler);

        return $twig;
    }
public function install(Environment $twig): Environment
    {
        $twig = clone $twig;

        $extension = new Extension($this->pipeline);
        $twig->addExtension($extension);

        $compiler = new PatchingCompiler($twig);
        $twig->setCompiler($compiler);

        return $twig;
    }
public function install ( Environment $ twig ) : Environment { $ twig = clone $ twig ; $ extension = new Extension ( $ this -> pipeline ) ; $ twig -> addExtension ( $ extension ) ; $ compiler = new PatchingCompiler ( $ twig ) ; $ twig -> setCompiler ( $ compiler ) ; return $ twig ; }
Returns a Twig instance with Shoot installed. Does not modify the original instance.

@param Environment $twig

@return Environment
Returns a Twig instance with Shoot installed . Does not modify the original instance .