Fix PHPDoc comments project-wide

This commit is contained in:
Hypolite Petovan
2019-01-06 16:06:53 -05:00
parent 6077aa5847
commit 3282ce5389
113 changed files with 1703 additions and 795 deletions

View File

@@ -65,7 +65,8 @@ class Image
* @brief Constructor
* @param object $data data
* @param boolean $type optional, default null
* @return object
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
public function __construct($data, $type = null)
{
@@ -128,6 +129,8 @@ class Image
/**
* @param object $data data
* @return boolean
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
private function loadData($data)
{
@@ -643,6 +646,7 @@ class Image
/**
* @param string $path file path
* @return mixed
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function saveToFilePath($path)
{
@@ -667,6 +671,7 @@ class Image
* $data = (string) $Image;
*
* @return string
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function __toString() {
return $this->asString();
@@ -674,6 +679,7 @@ class Image
/**
* @return mixed
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function asString()
{
@@ -721,9 +727,10 @@ class Image
*
* @param string $filename Image filename
* @param boolean $fromcurl Check Content-Type header from curl request
* @param string $header passed headers to take into account
* @param string $header passed headers to take into account
*
* @return object
* @throws \ImagickException
*/
public static function guessType($filename, $fromcurl = false, $header = '')
{
@@ -772,6 +779,7 @@ class Image
/**
* @param string $url url
* @return object
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public static function getInfoFromURL($url)
{
@@ -876,11 +884,13 @@ class Image
/**
* @brief This function is used by the fromgplus addon
* @param object $a App
* @param App $a App
* @param integer $uid user id
* @param string $imagedata optional, default empty
* @param string $url optional, default empty
* @return array
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
public static function storePhoto(App $a, $uid, $imagedata = "", $url = "")
{

View File

@@ -61,6 +61,7 @@ class Post extends BaseObject
* Constructor
*
* @param array $data data array
* @throws \Exception
*/
public function __construct(array $data)
{
@@ -116,6 +117,8 @@ class Post extends BaseObject
*
* @return mixed The data requested on success
* false on failure
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
public function getTemplateData(array $conv_responses, $thread_level = 1)
{
@@ -501,6 +504,7 @@ class Post extends BaseObject
* @param Post $item The child item to add
*
* @return mixed
* @throws \Exception
*/
public function addChild(Post $item)
{
@@ -590,6 +594,7 @@ class Post extends BaseObject
* @param Post $item The child to be removed
*
* @return boolean Success or failure
* @throws \Exception
*/
public function removeChild(Post $item)
{
@@ -679,6 +684,7 @@ class Post extends BaseObject
*
* @param string $name template name
* @return bool
* @throws \Exception
*/
private function setTemplate($name)
{
@@ -770,6 +776,7 @@ class Post extends BaseObject
*
* @return mixed The comment box string (empty if no comment box)
* false on failure
* @throws \Exception
*/
private function getCommentBox($indent)
{
@@ -849,6 +856,7 @@ class Post extends BaseObject
* Check if we are a wall to wall item and set the relevant properties
*
* @return void
* @throws \Exception
*/
protected function checkWallToWall()
{

View File

@@ -26,9 +26,10 @@ class Thread extends BaseObject
/**
* Constructor
*
* @param string $mode The mode
* @param boolean $preview Are we in the preview mode?
* @param string $mode The mode
* @param boolean $preview Are we in the preview mode?
* @param boolean $writable Override the writable check
* @throws \Exception
*/
public function __construct($mode, $preview, $writable = false)
{
@@ -39,10 +40,11 @@ class Thread extends BaseObject
/**
* Set the mode we'll be displayed on
*
* @param string $mode The mode to set
* @param string $mode The mode to set
* @param boolean $writable Override the writable check
*
* @return void
* @throws \Exception
*/
private function setMode($mode, $writable)
{
@@ -125,10 +127,11 @@ class Thread extends BaseObject
/**
* Add a thread to the conversation
*
* @param object $item The item to insert
* @param Post $item The item to insert
*
* @return mixed The inserted item on success
* false on failure
* @throws \Exception
*/
public function addParent(Post $item)
{
@@ -172,6 +175,7 @@ class Thread extends BaseObject
*
* @return mixed The data requested on success
* false on failure
* @throws \Exception
*/
public function getTemplateData($conv_responses)
{