src/Viserio/Component/View/ViewFactory.php
public function addExtension(string $extension, string $engine, Closure $resolver = null): FactoryContract
    {
        $this->getFinder()->addExtension($extension);

        if ($resolver !== null) {
            $this->engines->register($engine, $resolver);
        }

        if (isset(self::$extensions[$extension])) {
            unset(self::$extensions[$extension]);
        }

        self::$extensions = \array_merge([$extension => $engine], self::$extensions);

        return $this;
    }
public function addExtension(string $extension, string $engine, Closure $resolver = null): FactoryContract
    {
        $this->getFinder()->addExtension($extension);

        if ($resolver !== null) {
            $this->engines->register($engine, $resolver);
        }

        if (isset(self::$extensions[$extension])) {
            unset(self::$extensions[$extension]);
        }

        self::$extensions = \array_merge([$extension => $engine], self::$extensions);

        return $this;
    }
{@inheritdoc}