protected function getTwigTemplatesIn($directories)
    {
        if (count($directories) === 0) {
            return array();
        }
        $templates = Finder::create()->in($directories)->files()->name('*.*.twig');
        $templates = iterator_to_array($templates, false);
        $templates = array_map(function (SplFileInfo $file) {
            return $file->getRealPath();
        }, $templates);
        return $templates;
    }
protected function getTwigTemplatesIn($directories)
    {
        if (count($directories) === 0) {
            return array();
        }
        $templates = Finder::create()->in($directories)->files()->name('*.*.twig');
        $templates = iterator_to_array($templates, false);
        $templates = array_map(function (SplFileInfo $file) {
            return $file->getRealPath();
        }, $templates);
        return $templates;
    }
protected function getTwigTemplatesIn ( $ directories ) { if ( count ( $ directories ) === 0 ) { return array ( ) ; } $ templates = Finder :: create ( ) -> in ( $ directories ) -> files ( ) -> name ( '*.*.twig' ) ; $ templates = iterator_to_array ( $ templates , false ) ; $ templates = array_map ( function ( SplFileInfo $ file ) { return $ file -> getRealPath ( ) ; } , $ templates ) ; return $ templates ; }
Returns the paths to all Twig templates in the given directories.

@param string[] $directories
@return string[]
Returns the paths to all Twig templates in the given directories .