Merge pull request #8135 from annando/brief

@brief is removed completely
This commit is contained in:
Philipp 2020-01-19 12:31:02 +01:00 committed by GitHub
commit af88c2daa3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
170 changed files with 985 additions and 1024 deletions

View file

@ -6,12 +6,12 @@
namespace Friendica\Util;
/**
* @brief Array utility class
* Array utility class
*/
class Arrays
{
/**
* @brief Private constructor
* Private constructor
*/
private function __construct () {
// Utitlities don't have instances

View file

@ -24,7 +24,7 @@ class BasePath
}
/**
* @brief Returns the base filesystem path of the App
* Returns the base filesystem path of the App
*
* It first checks for the internal variable, then for DOCUMENT_ROOT and
* finally for PWD
@ -56,7 +56,7 @@ class BasePath
}
/**
* @brief Returns a normalized file path
* Returns a normalized file path
*
* This is a wrapper for the "realpath" function.
* That function cannot detect the real path when some folders aren't readable.

View file

@ -12,7 +12,7 @@ use Friendica\Core\Logger;
use Friendica\Core\System;
/**
* @brief Crypto class
* Crypto class
*/
class Crypto
{

View file

@ -12,7 +12,7 @@ use DateTimeZone;
use Exception;
/**
* @brief Temporal class
* Temporal class
*/
class DateTimeFormat
{
@ -84,7 +84,7 @@ class DateTimeFormat
}
/**
* @brief General purpose date parse/convert/format function.
* General purpose date parse/convert/format function.
*
* @param string $s Some parseable date/time string
* @param string $tz_to Destination timezone

View file

@ -11,7 +11,7 @@ use Friendica\DI;
use Friendica\Protocol\Email;
/**
* @brief class to handle emailing
* class to handle emailing
*/
class Emailer
{

View file

@ -45,7 +45,7 @@ class ExAuth
private $host;
/**
* @brief Create the class
* Create the class
*
*/
public function __construct()
@ -58,7 +58,7 @@ class ExAuth
}
/**
* @brief Standard input reading function, executes the auth with the provided
* Standard input reading function, executes the auth with the provided
* parameters
*
* @return null
@ -116,7 +116,7 @@ class ExAuth
}
/**
* @brief Check if the given username exists
* Check if the given username exists
*
* @param array $aCommand The command array
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
@ -162,7 +162,7 @@ class ExAuth
}
/**
* @brief Check remote user existance via HTTP(S)
* Check remote user existance via HTTP(S)
*
* @param string $host The hostname
* @param string $user Username
@ -196,7 +196,7 @@ class ExAuth
}
/**
* @brief Authenticate the given user and password
* Authenticate the given user and password
*
* @param array $aCommand The command array
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
@ -255,7 +255,7 @@ class ExAuth
}
/**
* @brief Check remote credentials via HTTP(S)
* Check remote credentials via HTTP(S)
*
* @param string $host The hostname
* @param string $user Username
@ -290,7 +290,7 @@ class ExAuth
}
/**
* @brief Set the hostname for this process
* Set the hostname for this process
*
* @param string $host The hostname
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
@ -329,7 +329,7 @@ class ExAuth
}
/**
* @brief write data to the syslog
* write data to the syslog
*
* @param integer $loglevel The syslog loglevel
* @param string $sMessage The syslog message
@ -343,7 +343,7 @@ class ExAuth
}
/**
* @brief destroy the class, close the syslog connection.
* destroy the class, close the syslog connection.
*/
public function __destruct()
{

View file

@ -12,7 +12,7 @@ use Friendica\Model\User;
use Friendica\Model\APContact;
/**
* @brief Implements HTTP Signatures per draft-cavage-http-signatures-07.
* Implements HTTP Signatures per draft-cavage-http-signatures-07.
*
* Ported from Hubzilla: https://framagit.org/hubzilla/core/blob/master/Zotlabs/Web/HTTPSig.php
*
@ -26,7 +26,7 @@ class HTTPSignature
{
// See draft-cavage-http-signatures-08
/**
* @brief Verifies a magic request
* Verifies a magic request
*
* @param $key
*
@ -274,7 +274,7 @@ class HTTPSignature
*/
/**
* @brief Transmit given data to a target for a user
* Transmit given data to a target for a user
*
* @param array $data Data that is about to be send
* @param string $target The URL of the inbox
@ -323,7 +323,7 @@ class HTTPSignature
}
/**
* @brief Set the delivery status for a given inbox
* Set the delivery status for a given inbox
*
* @param string $url The URL of the inbox
* @param boolean $success Transmission status
@ -378,7 +378,7 @@ class HTTPSignature
}
/**
* @brief Fetches JSON data for a user
* Fetches JSON data for a user
*
* @param string $request request url
* @param integer $uid User id of the requester
@ -408,7 +408,7 @@ class HTTPSignature
}
/**
* @brief Fetches raw data for a user
* Fetches raw data for a user
*
* @param string $request request url
* @param integer $uid User id of the requester
@ -464,7 +464,7 @@ class HTTPSignature
}
/**
* @brief Gets a signer from a given HTTP request
* Gets a signer from a given HTTP request
*
* @param $content
* @param $http_headers
@ -596,7 +596,7 @@ class HTTPSignature
}
/**
* @brief fetches a key for a given id and actor
* fetches a key for a given id and actor
*
* @param $id
* @param $actor

View file

@ -10,12 +10,12 @@ use Exception;
use Friendica\DI;
/**
* @brief This class contain methods to work with JsonLD data
* This class contain methods to work with JsonLD data
*/
class JsonLD
{
/**
* @brief Loader for LD-JSON validation
* Loader for LD-JSON validation
*
* @param $url
*
@ -51,7 +51,7 @@ class JsonLD
}
/**
* @brief Normalises a given JSON array
* Normalises a given JSON array
*
* @param array $json
*
@ -85,7 +85,7 @@ class JsonLD
}
/**
* @brief Compacts a given JSON array
* Compacts a given JSON array
*
* @param array $json
*
@ -146,7 +146,7 @@ class JsonLD
}
/**
* @brief Fetches an element array from a JSON array
* Fetches an element array from a JSON array
*
* @param $array
* @param $element
@ -185,7 +185,7 @@ class JsonLD
}
/**
* @brief Fetches an element from a JSON array
* Fetches an element from a JSON array
*
* @param $array
* @param $element

View file

@ -6,7 +6,7 @@ use Friendica\Core\Logger;
use Friendica\Model\APContact;
/**
* @brief Implements JSON-LD signatures
* Implements JSON-LD signatures
*
* Ported from Osada: https://framagit.org/macgirvin/osada
*/

View file

@ -22,7 +22,6 @@ class Network
* Set the cookiejar argument to a string (e.g. "/tmp/friendica-cookies.txt")
* to preserve cookies from one request to the next.
*
* @brief Curl wrapper
* @param string $url URL to fetch
* @param bool $binary default false
* TRUE if asked to return binary results (file download)
@ -47,7 +46,6 @@ class Network
* Inner workings and parameters are the same as @ref fetchUrl but returns an array with
* all the information collected during the fetch.
*
* @brief Curl wrapper with array of return values.
* @param string $url URL to fetch
* @param bool $binary default false
* TRUE if asked to return binary results (file download)
@ -74,7 +72,7 @@ class Network
}
/**
* @brief fetches an URL.
* fetches an URL.
*
* @param string $url URL to fetch
* @param bool $binary default false
@ -240,7 +238,7 @@ class Network
}
/**
* @brief Send POST request to $url
* Send POST request to $url
*
* @param string $url URL to post
* @param mixed $params array of POST variables
@ -359,7 +357,7 @@ class Network
}
/**
* @brief Check URL to see if it's real
* Check URL to see if it's real
*
* Take a URL from the wild, prepend http:// if necessary
* and check DNS to see if it's real (or check if is a valid IP address)
@ -394,7 +392,7 @@ class Network
}
/**
* @brief Checks that email is an actual resolvable internet address
* Checks that email is an actual resolvable internet address
*
* @param string $addr The email address
* @return boolean True if it's a valid email address, false if it's not
@ -422,7 +420,7 @@ class Network
}
/**
* @brief Check if URL is allowed
* Check if URL is allowed
*
* Check $url against our list of allowed sites,
* wildcards allowed. If allowed_sites is unset return true;
@ -497,7 +495,7 @@ class Network
}
/**
* @brief Check if email address is allowed to register here.
* Check if email address is allowed to register here.
*
* Compare against our list (wildcards allowed).
*
@ -526,7 +524,6 @@ class Network
/**
* Checks for the existence of a domain in a domain list
*
* @brief Checks for the existence of a domain in a domain list
* @param string $domain
* @param array $domain_list
* @return boolean
@ -564,7 +561,7 @@ class Network
}
/**
* @brief Remove Google Analytics and other tracking platforms params from URL
* Remove Google Analytics and other tracking platforms params from URL
*
* @param string $url Any user-submitted URL that may contain tracking params
* @return string The same URL stripped of tracking parameters
@ -613,7 +610,7 @@ class Network
}
/**
* @brief Returns the original URL of the provided URL
* Returns the original URL of the provided URL
*
* This function strips tracking query params and follows redirections, either
* through HTTP code or meta refresh tags. Stops after 10 redirections.
@ -733,7 +730,7 @@ class Network
}
/**
* @brief Find the matching part between two url
* Find the matching part between two url
*
* @param string $url1
* @param string $url2
@ -821,7 +818,7 @@ class Network
}
/**
* @brief Glue url parts together
* Glue url parts together
*
* @param array $parsed URL parts
*

View file

@ -1,7 +1,7 @@
<?php
/**
* @file src/Util/ParseUrl.php
* @brief Get informations about a given URL
* Get informations about a given URL
*/
namespace Friendica\Util;
@ -13,7 +13,7 @@ use Friendica\Core\Logger;
use Friendica\Database\DBA;
/**
* @brief Class with methods for extracting certain content from an url
* Class with methods for extracting certain content from an url
*/
class ParseUrl
{
@ -28,7 +28,7 @@ class ParseUrl
const MIN_DESC_COUNT = 100;
/**
* @brief Search for chached embeddable data of an url otherwise fetch it
* Search for chached embeddable data of an url otherwise fetch it
*
* @param string $url The url of the page which should be scraped
* @param bool $no_guessing If true the parse doens't search for
@ -80,7 +80,7 @@ class ParseUrl
}
/**
* @brief Parse a page for embeddable content information
* Parse a page for embeddable content information
*
* This method parses to url for meta data which can be used to embed
* the content. If available it prioritizes Open Graph meta tags.
@ -376,7 +376,7 @@ class ParseUrl
}
/**
* @brief Convert tags from CSV to an array
* Convert tags from CSV to an array
*
* @param string $string Tags
* @return array with formatted Hashtags
@ -393,9 +393,9 @@ class ParseUrl
}
/**
* @brief Add a hasht sign to a string
* Add a hasht sign to a string
*
* This method is used as callback function
* This method is used as callback function
*
* @param string $tag The pure tag name
* @param int $k Counter for internal use
@ -407,7 +407,7 @@ class ParseUrl
}
/**
* @brief Add a scheme to an url
* Add a scheme to an url
*
* The src attribute of some html elements (e.g. images)
* can miss the scheme so we need to add the correct

View file

@ -5,12 +5,12 @@
namespace Friendica\Util;
/**
* @brief Pidfile class
* Pidfile class
*/
class PidFile
{
/**
* @brief Read the pid from a given pid file
* Read the pid from a given pid file
*
* @param string $file Filename of pid file
*
@ -25,7 +25,7 @@ class PidFile
}
/**
* @brief Is there a running process with the given pid file
* Is there a running process with the given pid file
*
* @param string $file Filename of pid file
*
@ -49,7 +49,7 @@ class PidFile
}
/**
* @brief Kills a process from a given pid file
* Kills a process from a given pid file
*
* @param string $file Filename of pid file
*
@ -74,7 +74,7 @@ class PidFile
}
/**
* @brief Creates a pid file
* Creates a pid file
*
* @param string $file Filename of pid file
*
@ -96,7 +96,7 @@ class PidFile
}
/**
* @brief Deletes a given pid file
* Deletes a given pid file
*
* @param string $file Filename of pid file
*

View file

@ -6,7 +6,7 @@ use Friendica\Core\Config;
use Friendica\DI;
/**
* @brief Proxy utilities class
* Proxy utilities class
*/
class Proxy
{
@ -39,14 +39,14 @@ class Proxy
];
/**
* @brief Private constructor
* Private constructor
*/
private function __construct () {
// No instances from utilities classes
}
/**
* @brief Transform a remote URL into a local one.
* Transform a remote URL into a local one.
*
* This function only performs the URL replacement on http URL and if the
* provided URL isn't local, "the isn't deactivated" (sic) and if the config
@ -128,7 +128,7 @@ class Proxy
}
/**
* @brief "Proxifies" HTML code's image tags
* "Proxifies" HTML code's image tags
*
* "Proxifies", means replaces image URLs in given HTML code with those from
* proxy storage directory.
@ -146,7 +146,7 @@ class Proxy
}
/**
* @brief Checks if the URL is a local URL.
* Checks if the URL is a local URL.
*
* @param string $url
* @return boolean
@ -170,7 +170,7 @@ class Proxy
}
/**
* @brief Return the array of query string parameters from a URL
* Return the array of query string parameters from a URL
*
* @param string $url URL to parse
* @return array Associative array of query string parameters
@ -186,7 +186,7 @@ class Proxy
}
/**
* @brief Call-back method to replace the UR
* Call-back method to replace the UR
*
* @param array $matches Matches from preg_replace_callback()
* @return string Proxified HTML image tag

View file

@ -10,12 +10,12 @@ use Friendica\Content\ContactSelector;
use Friendica\Core\Logger;
/**
* @brief This class handles string functions
* This class handles string functions
*/
class Strings
{
/**
* @brief Generates a pseudo-random string of hexadecimal characters
* Generates a pseudo-random string of hexadecimal characters
*
* @param int $size
* @return string
@ -45,7 +45,7 @@ class Strings
}
/**
* @brief This is our primary input filter.
* This is our primary input filter.
*
* Use this on any text input where angle chars are not valid or permitted
* They will be replaced with safer brackets. This may be filtered further
@ -60,7 +60,7 @@ class Strings
}
/**
* @brief Use this on "body" or "content" input where angle chars shouldn't be removed,
* Use this on "body" or "content" input where angle chars shouldn't be removed,
* and allow them to be safely displayed.
* @param string $string
*
@ -72,7 +72,7 @@ class Strings
}
/**
* @brief Generate a string that's random, but usually pronounceable. Used to generate initial passwords
* Generate a string that's random, but usually pronounceable. Used to generate initial passwords
*
* @param int $len length
*
@ -179,7 +179,7 @@ class Strings
}
/**
* @brief Remove indentation from a text
* Remove indentation from a text
*
* @param string $text String to be transformed.
* @param string $chr Optional. Indentation tag. Default tab (\t).
@ -209,7 +209,7 @@ class Strings
}
/**
* @brief Get byte size returned in a Data Measurement (KB, MB, GB)
* Get byte size returned in a Data Measurement (KB, MB, GB)
*
* @param int $bytes The number of bytes to be measured
* @param int $precision Optional. Default 2.
@ -228,7 +228,7 @@ class Strings
}
/**
* @brief Protect percent characters in sprintf calls
* Protect percent characters in sprintf calls
*
* @param string $s String to transform.
*
@ -240,7 +240,7 @@ class Strings
}
/**
* @brief Base64 Encode URL and translate +/ to -_ Optionally strip padding.
* Base64 Encode URL and translate +/ to -_ Optionally strip padding.
*
* @param string $s URL to encode
* @param boolean $strip_padding Optional. Default false
@ -259,7 +259,7 @@ class Strings
}
/**
* @brief Decode Base64 Encoded URL and translate -_ to +/
* Decode Base64 Encoded URL and translate -_ to +/
* @param string $s URL to decode
*
* @return string Decoded URL
@ -292,7 +292,7 @@ class Strings
}
/**
* @brief Normalize url
* Normalize url
*
* @param string $url URL to be normalized.
*
@ -305,7 +305,7 @@ class Strings
}
/**
* @brief Normalize OpenID identity
* Normalize OpenID identity
*
* @param string $s OpenID Identity
*
@ -317,7 +317,7 @@ class Strings
}
/**
* @brief Compare two URLs to see if they are the same, but ignore
* Compare two URLs to see if they are the same, but ignore
* slight but hopefully insignificant differences such as if one
* is https and the other isn't, or if one is www.something and
* the other isn't - and also ignore case differences.

View file

@ -13,12 +13,12 @@ use Friendica\Core\Renderer;
use Friendica\Database\DBA;
/**
* @brief Temporal class
* Temporal class
*/
class Temporal
{
/**
* @brief Two-level sort for timezones.
* Two-level sort for timezones.
*
* @param string $a
* @param string $b
@ -45,7 +45,7 @@ class Temporal
}
/**
* @brief Emit a timezone selector grouped (primarily) by continent
* Emit a timezone selector grouped (primarily) by continent
*
* @param string $current Timezone
* @return string Parsed HTML output
@ -90,7 +90,7 @@ class Temporal
}
/**
* @brief Generating a Timezone selector
* Generating a Timezone selector
*
* Return a select using 'field_select_raw' template, with timezones
* grouped (primarily) by continent
@ -118,7 +118,7 @@ class Temporal
}
/**
* @brief Wrapper for date selector, tailored for use in birthday fields.
* Wrapper for date selector, tailored for use in birthday fields.
*
* @param string $dob Date of Birth
* @param string $timezone
@ -154,7 +154,7 @@ class Temporal
}
/**
* @brief Returns a date selector
* Returns a date selector
*
* @param DateTime $min Minimum date
* @param DateTime $max Maximum date
@ -170,7 +170,7 @@ class Temporal
}
/**
* @brief Returns a time selector
* Returns a time selector
*
* @param string $h Already selected hour
* @param string $m Already selected minute
@ -185,7 +185,7 @@ class Temporal
}
/**
* @brief Returns a datetime selector.
* Returns a datetime selector.
*
* @param DateTime $minDate Minimum date
* @param DateTime $maxDate Maximum date
@ -273,7 +273,7 @@ class Temporal
}
/**
* @brief Returns a relative date string.
* Returns a relative date string.
*
* Implements "3 seconds ago" etc.
* Based on $posted_date, (UTC).
@ -337,7 +337,7 @@ class Temporal
}
/**
* @brief Returns timezone correct age in years.
* Returns timezone correct age in years.
*
* Returns the age in years, given a date of birth, the timezone of the person
* whose date of birth is provided, and the timezone of the person viewing the
@ -384,7 +384,7 @@ class Temporal
}
/**
* @brief Get days of a month in a given year.
* Get days of a month in a given year.
*
* Returns number of days in the month of the given year.
* $m = 1 is 'January' to match human usage.
@ -400,7 +400,7 @@ class Temporal
}
/**
* @brief Returns the first day in month for a given month, year.
* Returns the first day in month for a given month, year.
*
* Months start at 1.
*
@ -418,7 +418,7 @@ class Temporal
}
/**
* @brief Output a calendar for the given month, year.
* Output a calendar for the given month, year.
*
* If $links are provided (array), e.g. $links[12] => 'http://mylink' ,
* date 12 will be linked appropriately. Today's date is also noted by

View file

@ -10,12 +10,12 @@ use Friendica\Core\System;
use SimpleXMLElement;
/**
* @brief This class contain methods to work with XML data
* This class contain methods to work with XML data
*/
class XML
{
/**
* @brief Creates an XML structure out of a given array
* Creates an XML structure out of a given array
*
* @param array $array The array of the XML structure that will be generated
* @param object $xml The createdXML will be returned by reference
@ -114,7 +114,7 @@ class XML
}
/**
* @brief Copies an XML object
* Copies an XML object
*
* @param object $source The XML source
* @param object $target The XML target
@ -134,7 +134,7 @@ class XML
}
/**
* @brief Create an XML element
* Create an XML element
*
* @param \DOMDocument $doc XML root
* @param string $element XML element name
@ -156,7 +156,7 @@ class XML
}
/**
* @brief Create an XML and append it to the parent object
* Create an XML and append it to the parent object
*
* @param \DOMDocument $doc XML root
* @param object $parent parent object
@ -172,7 +172,7 @@ class XML
}
/**
* @brief Convert an XML document to a normalised, case-corrected array
* Convert an XML document to a normalised, case-corrected array
* used by webfinger
*
* @param object $xml_element The XML document
@ -223,7 +223,7 @@ class XML
}
/**
* @brief Convert the given XML text to an array in the XML structure.
* Convert the given XML text to an array in the XML structure.
*
* Xml::toArray() will convert the given XML text to an array in the XML structure.
* Link: http://www.bin-co.com/php/scripts/xml2array/
@ -401,7 +401,7 @@ class XML
}
/**
* @brief Delete a node in a XML object
* Delete a node in a XML object
*
* @param \DOMDocument $doc XML document
* @param string $node Node name