original_string: protected function create_folder_in_folder(\repository_onedrive\rest $client, $foldername, $parentid) {
          $params = ['parentid' => $parentid];
          $folder = [ 'name' => $foldername, 'folder' => [ 'childCount' => 0 ]];
          $created = $client->call('create_folder', $params, json_encode($folder));
          if (empty($created->id)) {
              $details = 'Cannot create folder:' . $foldername;
              throw new repository_exception('errorwhilecommunicatingwith', 'repository', '', $details);
          }
          return $created->id;
      }
code: protected function create_folder_in_folder(\repository_onedrive\rest $client, $foldername, $parentid) {
          $params = ['parentid' => $parentid];
          $folder = [ 'name' => $foldername, 'folder' => [ 'childCount' => 0 ]];
          $created = $client->call('create_folder', $params, json_encode($folder));
          if (empty($created->id)) {
              $details = 'Cannot create folder:' . $foldername;
              throw new repository_exception('errorwhilecommunicatingwith', 'repository', '', $details);
          }
          return $created->id;
      }
code_tokens: protected function create_folder_in_folder ( \ repository_onedrive \ rest $ client , $ foldername , $ parentid ) { $ params = [ 'parentid' => $ parentid ] ; $ folder = [ 'name' => $ foldername , 'folder' => [ 'childCount' => 0 ] ] ; $ created = $ client -> call ( 'create_folder' , $ params , json_encode ( $ folder ) ) ; if ( empty ( $ created -> id ) ) { $ details = 'Cannot create folder:' . $ foldername ; throw new repository_exception ( 'errorwhilecommunicatingwith' , 'repository' , '' , $ details ) ; } return $ created -> id ; }
docstring: Create a folder within a folder
  
  @param \repository_onedrive\rest $client Authenticated client.
  @param string $foldername The folder we are creating.
  @param string $parentid The parent folder we are creating in.
  
  @return string The file id of the new folder.
docstring_tokens: Create a folder within a folder