protected function check(array $files, $path, $source, $template)
    {
        $file = null;

        foreach ((array) $files as $key => $value) {
            $filepath = (string) str_replace($path, $source, $value);

            $filepath = str_replace('\\', '/', (string) $filepath);

            $filepath = (string) preg_replace('/^\d\//i', '', $filepath);

            $exists = (string) $filepath === $template;

            $lowercase = strtolower($filepath) === $template;

            ($exists || $lowercase) && $file = $value;
        }

        return $file;
    }