original_string: public function getGuidFromRiverId($river_id = 0) {
  
  		$river_id = (int) $river_id;
  
  		$guid = $this->id_cache->get($river_id);
  		if ($guid) {
  			return $guid;
  		}
  
  		$objects = elgg_get_entities_from_metadata([
  			'types' => RiverObject::TYPE,
  			'subtypes' => [RiverObject::SUBTYPE, 'hjstream'],
  			'metadata_name_value_pairs' => [
  				'name' => 'river_id',
  				'value' => $river_id,
  			],
  			'limit' => 1,
  			'callback' => false,
  		]);
  
  		$guid = ($objects) ? $objects[0]->guid : false;
  
  		if ($guid) {
  			$this->id_cache->put($river_id, $guid);
  			return $guid;
  		}
  
  		return false;
  	}
code: public function getGuidFromRiverId($river_id = 0) {
  
  		$river_id = (int) $river_id;
  
  		$guid = $this->id_cache->get($river_id);
  		if ($guid) {
  			return $guid;
  		}
  
  		$objects = elgg_get_entities_from_metadata([
  			'types' => RiverObject::TYPE,
  			'subtypes' => [RiverObject::SUBTYPE, 'hjstream'],
  			'metadata_name_value_pairs' => [
  				'name' => 'river_id',
  				'value' => $river_id,
  			],
  			'limit' => 1,
  			'callback' => false,
  		]);
  
  		$guid = ($objects) ? $objects[0]->guid : false;
  
  		if ($guid) {
  			$this->id_cache->put($river_id, $guid);
  			return $guid;
  		}
  
  		return false;
  	}
code_tokens: public function getGuidFromRiverId ( $ river_id = 0 ) { $ river_id = ( int ) $ river_id ; $ guid = $ this -> id_cache -> get ( $ river_id ) ; if ( $ guid ) { return $ guid ; } $ objects = elgg_get_entities_from_metadata ( [ 'types' => RiverObject :: TYPE , 'subtypes' => [ RiverObject :: SUBTYPE , 'hjstream' ] , 'metadata_name_value_pairs' => [ 'name' => 'river_id' , 'value' => $ river_id , ] , 'limit' => 1 , 'callback' => false , ] ) ; $ guid = ( $ objects ) ? $ objects [ 0 ] -> guid : false ; if ( $ guid ) { $ this -> id_cache -> put ( $ river_id , $ guid ) ; return $ guid ; } return false ; }
docstring: Return value of the entity guid that corresponds to river_id
  
  @param int $river_id River item ID
  @return int|false
docstring_tokens: Return value of the entity guid that corresponds to river_id