Fix errors in Object namespace

This commit is contained in:
Art4 2024-12-06 21:55:04 +00:00
parent b35c45bf5a
commit 8b15bb9e66
17 changed files with 14 additions and 24 deletions

View file

@ -28,7 +28,6 @@ class Activity extends BaseDataTransferObject
/** /**
* Creates an activity * Creates an activity
* *
* @param array $item
* @throws \Friendica\Network\HTTPException\InternalServerErrorException * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/ */
public function __construct(int $week, int $statuses, int $logins, int $registrations) public function __construct(int $week, int $statuses, int $logins, int $registrations)

View file

@ -34,7 +34,6 @@ class Application extends BaseDataTransferObject
/** /**
* Creates an application entry * Creates an application entry
* *
* @param array $item
* @throws \Friendica\Network\HTTPException\InternalServerErrorException * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/ */
public function __construct(string $name, string $client_id = null, string $client_secret = null, int $id = null, string $redirect_uri = null, string $website = null, string $vapid_key = null) public function __construct(string $name, string $client_id = null, string $client_secret = null, int $id = null, string $redirect_uri = null, string $website = null, string $vapid_key = null)

View file

@ -32,7 +32,6 @@ class Emoji extends BaseDataTransferObject
// Optional attributes // Optional attributes
/** /**
* Unsupported * Unsupported
* @var string
*/ */
//protected $category; //protected $category;

View file

@ -23,9 +23,6 @@ class Error extends BaseDataTransferObject
/** /**
* Creates an error record * Creates an error record
*
* @param string $error
* @param string error_description
*/ */
public function __construct(string $error, string $error_description) public function __construct(string $error, string $error_description)
{ {

View file

@ -26,8 +26,6 @@ class ListEntity extends BaseDataTransferObject
/** /**
* Creates an list record * Creates an list record
* *
* @param int $id
* @param string $title
* @throws \Friendica\Network\HTTPException\InternalServerErrorException * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/ */
public function __construct(string $id, string $title, string $policy) public function __construct(string $id, string $title, string $policy)

View file

@ -45,10 +45,6 @@ class Preferences extends BaseDataTransferObject
/** /**
* Creates a preferences record. * Creates a preferences record.
* *
* @param BaseURL $baseUrl
* @param array $publicContact Full contact table record with uid = 0
* @param array $apcontact Optional full apcontact table record
* @param array $userContact Optional full contact table record with uid != 0
* @throws \Friendica\Network\HTTPException\InternalServerErrorException * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/ */
public function __construct(string $visibility, bool $sensitive, string $language, string $media, bool $spoilers) public function __construct(string $visibility, bool $sensitive, string $language, string $media, bool $spoilers)

View file

@ -12,6 +12,9 @@ namespace Friendica\Object\Api\Mastodon\Status;
* *
* @see https://docs.joinmastodon.org/entities/status * @see https://docs.joinmastodon.org/entities/status
* *
* @property-read int $replies
* @property-read int $reblogs
* @property-read int $favourites
* @property-read int $dislikes * @property-read int $dislikes
*/ */
class Counts class Counts

View file

@ -10,6 +10,12 @@ namespace Friendica\Object\Api\Mastodon\Status;
/** /**
* Class UserAttributes * Class UserAttributes
* *
* @property-read bool $favourited
* @property-read bool $reblogged
* @property-read bool $muted
* @property-read bool $bookmarked
* @property-read bool $pinned
*
* @see https://docs.joinmastodon.org/entities/status * @see https://docs.joinmastodon.org/entities/status
*/ */
class UserAttributes class UserAttributes

View file

@ -32,7 +32,7 @@ class Tag extends BaseDataTransferObject
* @param BaseURL $baseUrl * @param BaseURL $baseUrl
* @param array $tag tag-view record * @param array $tag tag-view record
* @param array $history * @param array $history
* @param array $following "true" if the user is following this tag * @param bool $following "true" if the user is following this tag
* @throws \Friendica\Network\HTTPException\InternalServerErrorException * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/ */
public function __construct(BaseURL $baseUrl, array $tag, array $history = [], bool $following = false) public function __construct(BaseURL $baseUrl, array $tag, array $history = [], bool $following = false)

View file

@ -26,7 +26,6 @@ class Attachment extends BaseDataTransferObject
/** /**
* Creates an Attachment entity array * Creates an Attachment entity array
* *
* @param array $attachment
* @throws \Friendica\Network\HTTPException\InternalServerErrorException * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/ */
public function __construct(array $media) public function __construct(array $media)

View file

@ -24,7 +24,6 @@ class Hashtag extends BaseDataTransferObject
/** /**
* Creates a hashtag * Creates a hashtag
* *
* @param array $attachment
* @throws \Friendica\Network\HTTPException\InternalServerErrorException * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/ */
public function __construct(string $name, array $indices) public function __construct(string $name, array $indices)

View file

@ -41,7 +41,6 @@ class Media extends BaseDataTransferObject
/** /**
* Creates a media entity array * Creates a media entity array
* *
* @param array $attachment
* @throws \Friendica\Network\HTTPException\InternalServerErrorException * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/ */
public function __construct(array $media, string $url, array $indices) public function __construct(array $media, string $url, array $indices)

View file

@ -31,7 +31,6 @@ class Mention extends BaseDataTransferObject
/** /**
* Creates a mention record from an tag-view record. * Creates a mention record from an tag-view record.
* *
* @param BaseURL $baseUrl
* @param array $tag tag-view record * @param array $tag tag-view record
* @param array $contact contact table record * @param array $contact contact table record
* @throws \Friendica\Network\HTTPException\InternalServerErrorException * @throws \Friendica\Network\HTTPException\InternalServerErrorException

View file

@ -34,7 +34,6 @@ class SavedSearch extends BaseDataTransferObject
/** /**
* Creates a saved search record from a search record. * Creates a saved search record from a search record.
* *
* @param BaseURL $baseUrl
* @param array $search Full search table record * @param array $search Full search table record
*/ */
public function __construct(array $search) public function __construct(array $search)

View file

@ -28,7 +28,6 @@ class Url extends BaseDataTransferObject
/** /**
* Creates an URL entity array * Creates an URL entity array
* *
* @param array $attachment
* @throws \Friendica\Network\HTTPException\InternalServerErrorException * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/ */
public function __construct(array $media, array $indices) public function __construct(array $media, array $indices)

View file

@ -13,7 +13,7 @@ use Friendica\Util\Images;
use Imagick; use Imagick;
use ImagickDraw; use ImagickDraw;
use ImagickPixel; use ImagickPixel;
use GDImage; use GdImage;
use kornrunner\Blurhash\Blurhash; use kornrunner\Blurhash\Blurhash;
/** /**
@ -21,7 +21,7 @@ use kornrunner\Blurhash\Blurhash;
*/ */
class Image class Image
{ {
/** @var GDImage|Imagick|resource */ /** @var GdImage|Imagick|resource */
private $image; private $image;
/* /*
@ -41,7 +41,7 @@ class Image
* @param string $data Image data * @param string $data Image data
* @param string $type optional, default '' * @param string $type optional, default ''
* @param string $filename optional, default '' * @param string $filename optional, default ''
* @param string $imagick optional, default 'true' * @param bool $imagick optional, default 'true'
* @throws \Friendica\Network\HTTPException\InternalServerErrorException * @throws \Friendica\Network\HTTPException\InternalServerErrorException
* @throws \ImagickException * @throws \ImagickException
*/ */
@ -765,7 +765,6 @@ class Image
/** /**
* Create a blurhash out of a given image string * Create a blurhash out of a given image string
* *
* @param string $img_str
* @return string * @return string
*/ */
public function getBlurHash(): string public function getBlurHash(): string

View file

@ -39,7 +39,7 @@ class ParsedLogLine
public $logline; public $logline;
/** /**
* @param int line id * @param int $id line id
* @param string $logline Source log line to parse * @param string $logline Source log line to parse
*/ */
public function __construct(int $id, string $logline) public function __construct(int $id, string $logline)