Fix docblocks types

This commit is contained in:
Hypolite Petovan 2017-12-17 15:27:50 -05:00
parent 10b72b0e9e
commit 916236ce2f
12 changed files with 33 additions and 29 deletions

View File

@ -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()
{

View File

@ -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

View File

@ -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 = '') {

View File

@ -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)
{

View File

@ -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)

View File

@ -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;

View File

@ -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()
{

View File

@ -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 \<title\>Awesome Title\</title\> or
* \<meta name="description" content="An awesome description"\>
*
* @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

View File

@ -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,7 +2963,7 @@ class DFRN
/**
* @brief Imports a DFRN message
*
* @param text $xml The DFRN message
* @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

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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) {