original_string: protected function resolvePath(array $originalPaths)
      {
          $paths = array();
  
          foreach ($originalPaths as $key => $path) {
              if (count(explode('templates', $path)) == 1) {
                  $path = $path . DIRECTORY_SEPARATOR . 'templates';
              }
  
              if (realpath($path)) {
                  $paths[$key] = realpath($path);
              }
  
          }
  
          return array_unique($paths);
      }
code: protected function resolvePath(array $originalPaths)
      {
          $paths = array();
  
          foreach ($originalPaths as $key => $path) {
              if (count(explode('templates', $path)) == 1) {
                  $path = $path . DIRECTORY_SEPARATOR . 'templates';
              }
  
              if (realpath($path)) {
                  $paths[$key] = realpath($path);
              }
  
          }
  
          return array_unique($paths);
      }
code_tokens: protected function resolvePath ( array $ originalPaths ) { $ paths = array ( ) ; foreach ( $ originalPaths as $ key => $ path ) { if ( count ( explode ( 'templates' , $ path ) ) == 1 ) { $ path = $ path . DIRECTORY_SEPARATOR . 'templates' ; } if ( realpath ( $ path ) ) { $ paths [ $ key ] = realpath ( $ path ) ; } } return array_unique ( $ paths ) ; }
docstring: Build an array for templates path directory
  
  @return void
docstring_tokens: Build an array for templates path directory