original_string: protected function normalizeDirectory($directory)
      {
          $last = $directory[strlen($directory) - 1];
          if (in_array($last, array('/', '\\'))) {
              $directory[strlen($directory) - 1] = DIRECTORY_SEPARATOR;
              return $directory;
          }
          $directory .= DIRECTORY_SEPARATOR;
          return $directory;
      }
code: protected function normalizeDirectory($directory)
      {
          $last = $directory[strlen($directory) - 1];
          if (in_array($last, array('/', '\\'))) {
              $directory[strlen($directory) - 1] = DIRECTORY_SEPARATOR;
              return $directory;
          }
          $directory .= DIRECTORY_SEPARATOR;
          return $directory;
      }
code_tokens: protected function normalizeDirectory ( $ directory ) { $ last = $ directory [ strlen ( $ directory ) - 1 ] ; if ( in_array ( $ last , array ( '/' , '\\' ) ) ) { $ directory [ strlen ( $ directory ) - 1 ] = DIRECTORY_SEPARATOR ; return $ directory ; } $ directory .= DIRECTORY_SEPARATOR ; return $ directory ; }
docstring: Normalize the directory to include a trailing directory separator
  
  @param  string $directory
  @return string
docstring_tokens: Normalize the directory to include a trailing directory separator