code: private function findTemplates()
      {
          $templates = array(
              "base" => array(),
              "template" => array(),
          );
          $finder = new Finder();
          $files = $finder->files()->in($this->templatesDir);
          foreach ($files as $file) {
              $file = (string)$file;
              $templateName = basename($file, '.html.twig');
  
              $key = 'template';
              if (str_replace($this->templatesDir . '/', '', $file) != $templateName . '.html.twig') {
                  $key = 'base';
              }
              $templates[$key][$templateName] = $file;
          }
  
          return $templates;
      }
docs: Finds the theme's templates
  @param null|int $depth When null parses all subfolders
  
  @return array