original_string: private function addResolvedPath(SplFileInfo $file, array & $map, $basePath, TemplatePathStack $resolver)
      {
          $filePath      = $file->getRealPath();
          $fileName      = pathinfo($filePath, PATHINFO_FILENAME);
          $relativePath  = trim(str_replace($basePath, '', $file->getPath()), '/\\');
          $templateName  = str_replace('\\', '/', trim($relativePath . '/' . $fileName, '/'));
  
          if ($fileName && ($resolvedPath = $resolver->resolve($templateName))) {
              $map[$templateName] = realpath($resolvedPath);
          }
      }
code: private function addResolvedPath(SplFileInfo $file, array & $map, $basePath, TemplatePathStack $resolver)
      {
          $filePath      = $file->getRealPath();
          $fileName      = pathinfo($filePath, PATHINFO_FILENAME);
          $relativePath  = trim(str_replace($basePath, '', $file->getPath()), '/\\');
          $templateName  = str_replace('\\', '/', trim($relativePath . '/' . $fileName, '/'));
  
          if ($fileName && ($resolvedPath = $resolver->resolve($templateName))) {
              $map[$templateName] = realpath($resolvedPath);
          }
      }
code_tokens: private function addResolvedPath ( SplFileInfo $ file , array & $ map , $ basePath , TemplatePathStack $ resolver ) { $ filePath = $ file -> getRealPath ( ) ; $ fileName = pathinfo ( $ filePath , PATHINFO_FILENAME ) ; $ relativePath = trim ( str_replace ( $ basePath , '' , $ file -> getPath ( ) ) , '/\\' ) ; $ templateName = str_replace ( '\\' , '/' , trim ( $ relativePath . '/' . $ fileName , '/' ) ) ; if ( $ fileName && ( $ resolvedPath = $ resolver -> resolve ( $ templateName ) ) ) { $ map [ $ templateName ] = realpath ( $ resolvedPath ) ; } }
docstring: Add the given file to the map if it corresponds to a resolved view
  
  @param SplFileInfo       $file
  @param array             $map
  @param string            $basePath
  @param TemplatePathStack $resolver
  
  @return void
  
  @throws \Zend\View\Exception\DomainException
docstring_tokens: Add the given file to the map if it corresponds to a resolved view