original_string: public function getHistory(LibraryType $library, DirectoryItem $item)
      {
          $url = $this->client->getConfig('base_uri')
              . '/repos/'
              . $library->id
              . '/file/history/'
              . '?p=' . $this->urlEncodePath($item->path . $item->name);
  
          $response = $this->client->request('GET', $url);
  
          $json = json_decode($response->getBody());
  
          $fileHistoryCollection = [];
  
          foreach ($json->commits as $lib) {
              $fileHistoryCollection[] = (new FileHistoryItem)->fromJson($lib);
          }
  
          return $fileHistoryCollection;
      }
code: public function getHistory(LibraryType $library, DirectoryItem $item)
      {
          $url = $this->client->getConfig('base_uri')
              . '/repos/'
              . $library->id
              . '/file/history/'
              . '?p=' . $this->urlEncodePath($item->path . $item->name);
  
          $response = $this->client->request('GET', $url);
  
          $json = json_decode($response->getBody());
  
          $fileHistoryCollection = [];
  
          foreach ($json->commits as $lib) {
              $fileHistoryCollection[] = (new FileHistoryItem)->fromJson($lib);
          }
  
          return $fileHistoryCollection;
      }
code_tokens: public function getHistory ( LibraryType $ library , DirectoryItem $ item ) { $ url = $ this -> client -> getConfig ( 'base_uri' ) . '/repos/' . $ library -> id . '/file/history/' . '?p=' . $ this -> urlEncodePath ( $ item -> path . $ item -> name ) ; $ response = $ this -> client -> request ( 'GET' , $ url ) ; $ json = json_decode ( $ response -> getBody ( ) ) ; $ fileHistoryCollection = [ ] ; foreach ( $ json -> commits as $ lib ) { $ fileHistoryCollection [ ] = ( new FileHistoryItem ) -> fromJson ( $ lib ) ; } return $ fileHistoryCollection ; }
docstring: Get history of a file DirectoryItem
  
  @param LibraryType   $library Library instance
  @param DirectoryItem $item    Item instance
  
  @return FileHistoryItem[]
  @throws \GuzzleHttp\Exception\GuzzleException
  @throws Exception
docstring_tokens: Get history of a file DirectoryItem