diff --git a/boot.php b/boot.php index 695f9e85c5..00058727f5 100644 --- a/boot.php +++ b/boot.php @@ -524,6 +524,8 @@ function startup() * @brief Retrieve the App structure * * Useful in functions which require it but don't get it passed to them + * + * @return App */ function get_app() { diff --git a/include/text.php b/include/text.php index 5cc573697d..cbba8d0c5b 100644 --- a/include/text.php +++ b/include/text.php @@ -1701,7 +1701,7 @@ function array_xmlify($val){ /** - * transorm link href and img src from relative to absolute + * transform link href and img src from relative to absolute * * @param string $text * @param string $base base url diff --git a/src/App.php b/src/App.php index adea01a037..b16786140a 100644 --- a/src/App.php +++ b/src/App.php @@ -619,7 +619,7 @@ class App { * If $name is not defined, return engine defined by theme, * or default * - * @param strin $name Template engine name + * @param string $name Template engine name * @return object Template Engine instance */ function template_engine($name = '') { diff --git a/src/Model/Contact.php b/src/Model/Contact.php index aec417a65d..1b15f1c76d 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -197,7 +197,7 @@ class Contact extends BaseObject * up or some other transient event and that there's a possibility we could recover from it. * * @param array $contact contact to mark for archival - * @return type + * @return null */ public static function markForArchival(array $contact) { diff --git a/src/Model/GContact.php b/src/Model/GContact.php index 5622124481..6c13c03b1e 100644 --- a/src/Model/GContact.php +++ b/src/Model/GContact.php @@ -636,7 +636,7 @@ class GContact /** * @brief Replace alternate OStatus user format with the primary one * - * @param arr $contact contact array (called by reference) + * @param array $contact contact array (called by reference) * @return void */ public static function fixAlternateContactAddress(&$contact) @@ -656,7 +656,7 @@ class GContact /** * @brief Fetch the gcontact id, add an entry if not existed * - * @param arr $contact contact array + * @param array $contact contact array * * @return bool|int Returns false if not found, integer if contact was found */ @@ -747,7 +747,7 @@ class GContact /** * @brief Updates the gcontact table from a given array * - * @param arr $contact contact array + * @param array $contact contact array * * @return bool|int Returns false if not found, integer if contact was found */ @@ -908,7 +908,7 @@ class GContact /** * @brief Updates the gcontact entry from probe * - * @param str $url profile link + * @param string $url profile link * @return void */ public static function updateFromProbe($url) @@ -974,7 +974,7 @@ class GContact * * If the "Statistics" plugin is enabled (See http://gstools.org/ for details) we query user data with this. * - * @param str $server Server address + * @param string $server Server address * @return void */ public static function fetchGsUsers($server) diff --git a/src/Model/Group.php b/src/Model/Group.php index 209c78798b..410f78b156 100644 --- a/src/Model/Group.php +++ b/src/Model/Group.php @@ -131,7 +131,7 @@ class Group extends BaseObject /** * @brief Mark a group as deleted * - * @param type $gid + * @param int $gid * @return boolean */ public static function remove($gid) { @@ -176,9 +176,9 @@ class Group extends BaseObject * * @deprecated Use Group::remove instead * - * @param type $uid - * @param type $name - * @return type + * @param int $uid + * @param string $name + * @return bool */ public static function removeByName($uid, $name) { $return = false; diff --git a/src/Object/Image.php b/src/Object/Image.php index b39945ede6..f979e49438 100644 --- a/src/Object/Image.php +++ b/src/Object/Image.php @@ -111,7 +111,7 @@ class Image /** * @brief Maps Mime types to Imagick formats - * @return arr With with image formats (mime type as key) + * @return array With with image formats (mime type as key) */ public static function getFormatsMap() { diff --git a/src/ParseUrl.php b/src/ParseUrl.php index c2c01b8aeb..9e46281ec9 100644 --- a/src/ParseUrl.php +++ b/src/ParseUrl.php @@ -25,10 +25,10 @@ class ParseUrl /** * @brief Search for chached embeddable data of an url otherwise fetch it * - * @param type $url The url of the page which should be scraped - * @param type $no_guessing If true the parse doens't search for + * @param string $url The url of the page which should be scraped + * @param bool $no_guessing If true the parse doens't search for * preview pictures - * @param type $do_oembed The false option is used by the function fetch_oembed() + * @param bool $do_oembed The false option is used by the function fetch_oembed() * to avoid endless loops * * @return array which contains needed data for embedding @@ -89,12 +89,12 @@ class ParseUrl * like \Awesome Title\ or * \ * - * @param type $url The url of the page which should be scraped - * @param type $no_guessing If true the parse doens't search for + * @param string $url The url of the page which should be scraped + * @param bool $no_guessing If true the parse doens't search for * preview pictures - * @param type $do_oembed The false option is used by the function fetch_oembed() + * @param bool $do_oembed The false option is used by the function fetch_oembed() * to avoid endless loops - * @param type $count Internal counter to avoid endless loops + * @param int $count Internal counter to avoid endless loops * * @return array which contains needed data for embedding * string 'url' => The url of the parsed page diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index e9df296258..ee5e76cb4e 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -1443,7 +1443,7 @@ class DFRN * @param bool $onlyfetch Should the data only be fetched or should it update the contact record as well * @param string $xml optional, default empty * - * @return Returns an array with relevant data of the author + * @return array Relevant data of the author * @todo Find good type-hints for all parameter */ private static function fetchauthor($xpath, $context, $importer, $element, $onlyfetch, $xml = "") @@ -1692,7 +1692,7 @@ class DFRN * * @param object $xpath XPath object * @param object $activity Activity object - * @param text $element element name + * @param string $element element name * * @return string XML string * @todo Find good type-hints for all parameter @@ -2963,9 +2963,9 @@ class DFRN /** * @brief Imports a DFRN message * - * @param text $xml The DFRN message - * @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 + * @param string $xml The DFRN message + * @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 */ diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index 9090e4b6b2..5ae63bd7a8 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -928,10 +928,12 @@ class Diaspora /** * @brief Get a contact id for a given handle * + * @todo Move to Friendica\Model\Contact + * * @param int $uid The user id * @param string $handle The handle in the format user@domain.tld * - * @return The contact id + * @return int Contact id */ private static function contactByHandle($uid, $handle) { @@ -1113,7 +1115,7 @@ class Diaspora * @param string $body The item body to replace links from * @param string $author_link The author link for missing local contact fallback * - * @return the replaced string + * @return string the replaced string */ public static function replacePeopleGuid($body, $author_link) { diff --git a/src/Util/XML.php b/src/Util/XML.php index e5e649a07c..bfd1b8bf59 100644 --- a/src/Util/XML.php +++ b/src/Util/XML.php @@ -176,7 +176,7 @@ class XML * @param integer $recursion_depth recursion counter for internal use - default 0 * internal use, recursion counter * - * @return array | sring The array from the xml element or the string + * @return array | string The array from the xml element or the string */ public static function elementToArray($xml_element, &$recursion_depth = 0) { diff --git a/src/Worker/DiscoverPoCo.php b/src/Worker/DiscoverPoCo.php index b3c03e9050..b7b7f0a31c 100644 --- a/src/Worker/DiscoverPoCo.php +++ b/src/Worker/DiscoverPoCo.php @@ -268,7 +268,7 @@ class DiscoverPoCo { /** * @brief Search for GNU Social user with gstools.org * - * @param str $search User name + * @param string $search User name */ private static function gsSearchUser($search) {