src/Viserio/Component/View/ViewFactory.php
protected function getExtension(string $path): ?string
    {
        $callback = function ($value) use ($path) {
            return $this->endsWith($path, $value);
        };

        foreach (\array_keys(self::$extensions) as $key => $value) {
            if ($callback($value)) {
                return $value;
            }
        }

        return null;
    }
protected function getExtension(string $path): ?string
    {
        $callback = function ($value) use ($path) {
            return $this->endsWith($path, $value);
        };

        foreach (\array_keys(self::$extensions) as $key => $value) {
            if ($callback($value)) {
                return $value;
            }
        }

        return null;
    }
Get the extension used by the view file.

@param string $path

@return null|string