src/Viserio/Component/View/ViewFinder.php
protected function findInPaths(string $name, array $paths): array
    {
        foreach ($paths as $path) {
            foreach ($this->getPossibleViewFiles($name) as $fileInfos) {
                $viewPath = $path . \DIRECTORY_SEPARATOR . $fileInfos['file'];

                if ($this->files->has($viewPath)) {
                    return [
                        'path'      => $viewPath,
                        'name'      => $fileInfos['file'],
                        'extension' => $fileInfos['extension'],
                    ];
                }
            }
        }

        throw new InvalidArgumentException(\sprintf('View [%s] not found.', $name));
    }
protected function findInPaths(string $name, array $paths): array
    {
        foreach ($paths as $path) {
            foreach ($this->getPossibleViewFiles($name) as $fileInfos) {
                $viewPath = $path . \DIRECTORY_SEPARATOR . $fileInfos['file'];

                if ($this->files->has($viewPath)) {
                    return [
                        'path'      => $viewPath,
                        'name'      => $fileInfos['file'],
                        'extension' => $fileInfos['extension'],
                    ];
                }
            }
        }

        throw new InvalidArgumentException(\sprintf('View [%s] not found.', $name));
    }
Find the given view in the list of paths.

@param string $name
@param array  $paths

@throws \Viserio\Component\Contract\View\Exception\InvalidArgumentException

@return array