* @param integer $uid User id
*
* @return array importer
+ * @throws \Exception
*/
public static function getImporter($cid, $uid = 0)
{
* @param array $owner Owner record
*
* @return string DFRN entries
- * @todo Find proper type-hints
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws \ImagickException
+ * @todo Find proper type-hints
*/
public static function entries($items, $owner)
{
* @param boolean $onlyheader Output only the header without content? (Default is "no")
*
* @return string DFRN feed entries
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws \ImagickException
*/
public static function feed($dfrn_id, $owner_nick, $last_update, $direction = 0, $onlyheader = false)
{
* @param boolean $conversation Show the conversation. If false show the single post.
*
* @return string DFRN feed entry
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws \ImagickException
*/
public static function itemFeed($item_id, $conversation = false)
{
* @param array $owner Owner record
*
* @return string DFRN mail
- * @todo Find proper type-hints
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @todo Find proper type-hints
*/
public static function mail($item, $owner)
{
* @param array $owner Owner record
*
* @return string DFRN suggestions
- * @todo Find proper type-hints
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @todo Find proper type-hints
*/
public static function fsuggest($item, $owner)
{
* @param int $uid User ID
*
* @return string DFRN relocations
- * @todo Find proper type-hints
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @todo Find proper type-hints
*/
public static function relocate($owner, $uid)
{
* @param bool $public Is it a header for public posts?
*
* @return object XML root object
- * @todo Find proper type-hints
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @todo Find proper type-hints
*/
private static function addHeader($doc, $owner, $authorelement, $alternatelink = "", $public = false)
{
* @param boolean $public boolean
*
* @return object XML author object
- * @todo Find proper type-hints
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @todo Find proper type-hints
*/
private static function addAuthor($doc, $owner, $authorelement, $public)
{
* @param array $item Item elements
*
* @return object XML author object
- * @todo Find proper type-hints
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @todo Find proper type-hints
*/
private static function addEntryAuthor($doc, $element, $contact_url, $item)
{
* @param string $activity activity value
*
* @return object XML activity object
- * @todo Find proper type-hints
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @todo Find proper type-hints
*/
private static function createActivity($doc, $element, $activity)
{
* @param object $root XML root
* @param array $item Item element
*
- * @return object XML attachment object
- * @todo Find proper type-hints
+ * @return void XML attachment object
+ * @todo Find proper type-hints
*/
private static function getAttachment($doc, $root, $item)
{
* @param bool $single If set, the entry is created as an XML document with a single "entry" element
*
* @return object XML entry object
- * @todo Find proper type-hints
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws \ImagickException
+ * @todo Find proper type-hints
*/
private static function entry($doc, $type, array $item, array $owner, $comment = false, $cid = 0, $single = false)
{
* @param string $atom Content that will be transmitted
* @param bool $dissolve (to be documented)
*
+ * @param bool $legacy_transport
* @return int Deliver status. Negative values mean an error.
- * @todo Add array type-hint for $owner, $contact
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws \ImagickException
+ * @todo Add array type-hint for $owner, $contact
*/
public static function deliver($owner, $contact, $atom, $dissolve = false, $legacy_transport = false)
{
/**
* @brief Transmits atom content to the contacts via the Diaspora transport layer
*
- * @param array $owner Owner record
- * @param array $contact Contact record of the receiver
- * @param string $atom Content that will be transmitted
+ * @param array $owner Owner record
+ * @param array $contact Contact record of the receiver
+ * @param string $atom Content that will be transmitted
*
+ * @param bool $public_batch
* @return int Deliver status. Negative values mean an error.
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws \ImagickException
*/
public static function transmit($owner, $contact, $atom, $public_batch = false)
{
* @param string $xml optional, default empty
*
* @return array Relevant data of the author
- * @todo Find good type-hints for all parameter
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws \ImagickException
+ * @todo Find good type-hints for all parameter
*/
private static function fetchauthor($xpath, $context, $importer, $element, $onlyfetch, $xml = "")
{
* @param object $mail mail elements
* @param array $importer Record of the importer user mixed with contact of the content
* @return void
- * @todo Find good type-hints for all parameter
+ * @throws \Exception
+ * @todo Find good type-hints for all parameter
*/
private static function processMail($xpath, $mail, $importer)
{
* @param object $suggestion suggestion elements
* @param array $importer Record of the importer user mixed with contact of the content
* @return boolean
- * @todo Find good type-hints for all parameter
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @todo Find good type-hints for all parameter
*/
private static function processSuggestion($xpath, $suggestion, $importer)
{
* @param object $relocation relocation elements
* @param array $importer Record of the importer user mixed with contact of the content
* @return boolean
- * @todo Find good type-hints for all parameter
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws \ImagickException
+ * @todo Find good type-hints for all parameter
*/
private static function processRelocation($xpath, $relocation, $importer)
{
* @param array $importer Record of the importer user mixed with contact of the content
* @param int $entrytype Is it a toplevel entry, a comment or a relayed comment?
* @return mixed
- * @todo set proper type-hints (array?)
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @todo set proper type-hints (array?)
*/
private static function updateContent($current, $item, $importer, $entrytype)
{
* @param array $item the new item record
*
* @return int Is it a toplevel entry, a comment or a relayed comment?
- * @todo set proper type-hints (array?)
+ * @throws \Exception
+ * @todo set proper type-hints (array?)
*/
private static function getEntryType($importer, $item)
{
* @param array $importer Record of the importer user mixed with contact of the content
* @param int $posted_id The record number of item record that was just posted
* @return void
- * @todo set proper type-hints (array?)
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @todo set proper type-hints (array?)
*/
private static function doPoke($item, $importer, $posted_id)
{
* @param bool $is_like Is the verb a "like"?
*
* @return bool Should the processing of the entries be continued?
- * @todo set proper type-hints (array?)
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @todo set proper type-hints (array?)
*/
private static function processVerbs($entrytype, $importer, &$item, &$is_like)
{
* @param array $importer Record of the importer user mixed with contact of the content
* @param object $xml xml
* @return void
- * @todo Add type-hints
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws \ImagickException
+ * @todo Add type-hints
*/
private static function processEntry($header, $xpath, $entry, $importer, $xml)
{
* @param object $deletion deletion elements
* @param array $importer Record of the importer user mixed with contact of the content
* @return void
- * @todo set proper type-hints
+ * @throws \Exception
+ * @todo set proper type-hints
*/
private static function processDeletion($xpath, $deletion, $importer)
{
* @param array $importer Record of the importer user mixed with contact of the content
* @param bool $sort_by_date Is used when feeds are polled
* @return integer Import status
- * @todo set proper type-hints
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws \ImagickException
+ * @todo set proper type-hints
*/
public static function import($xml, $importer, $sort_by_date = false)
{
/**
* @param App $a App
* @param string $contact_nick contact nickname
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public static function autoRedir(App $a, $contact_nick)
{
* item is assumed to be up-to-date. If the timestamps are equal it
* assumes the update has been seen before and should be ignored.
*
+ * @param $existing
+ * @param $update
+ * @return bool
+ * @throws \Exception
*/
private static function isEditedTimestampNewer($existing, $update)
{